OAuth login flow not working as expected

Hi, everyone.

I have used https://app.netlify.com/authorize?client_id=MY_CLIENT_ID&redirect_uri=MY_REDIRECT_URI&response_type=token&state=MY_STATE to authorize my users with netlify.

when the user has already logged in to the netlify account before using the above URL, the netlify website asks to log in to their appropriate account. After the user has logged in, it is not redirecting the user to the page where users can able to authorize my app. Instead, it is redirecting to https://app.netlify.com/.

But it should either redirect to the authorization page or redirect back to my website.


This is known and currently expected. The user must be logged in before starting the OAuth flow or would have to visit your website again after logging in to Netlify.

Hey, @hrishikesh. Thanks for replying.

But all other oAuth providers are handling this scenario and redirecting back to my site, even if the user has logged in or not logged in.

Is there any alternative solution for my issue, where users can authorize my application in a better way?

There’s no solution at the moment. You’d have to add a warning or a note right now to ask the users to login to Netlify before initiating the OAuth connection.