MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
274 stars 246 forks source link

Is it correct to use this library like this? #542

Closed sunghoonbreeding closed 1 month ago

sunghoonbreeding commented 1 month ago

I specified my Node.js server URL as the redirect URL. I tried to send the authorization code received on my server to Google (https://accounts.google.com/o/oauth2/v2/auth) to get the access token. Since I’m receiving an “Invalid code verifier” response, it seems that the code verifier sent from Flutter also needs to be used when sending the request from my Node.js server to Google. To do this, I think I need to pass the code verifier from Flutter to my Node.js server, but when I try to send it as a query string, I get a redirect URL mismatch error. Is there another way to do this?

sunghoonbreeding commented 1 month ago

Can't I turn over code verifier to authorizeAndExchangeCode?

MaikuB commented 1 month ago

If you're going to have it go through your own server then this is something you'd need to look into on your own and cross check with OAuth specifications. At this point this is about your own use case as opposed to being an issue with the plugin and your use case is already an abnormal one. Normally the configuration is done so that the redirect URI goes directly to the app via a custom scheme or if a HTTPS URL is used, some deep-linking configuration is done where the app can intercept and process the redirect

sunghoonbreeding commented 1 month ago

Thank you for your response