Reading accessToken right after login

I am trying to access a user permission right after log in and make some checks in nextjs. If the checks fail, i want to be sent back to login form.