Generic OAuth custom authorization logic

Hi there! I am using the Generic OAuth plugin in Nextjs with Hubspot and need to add some functionality that will deny a user access based on their email or associated user info, preventing these users signing up/accessing pages covered by the middleware. Is there a nice way of doing this without getting the session in the middleware and denying based on data? As that requires a database call.
1 Reply
Jakub
JakubOP4mo ago
bump

Did you find this page helpful?