You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BACKGROUND
I'm relatively new to Flutter and trying to build a new app from scratch (currently just in development and only testing on Android right now) using the oauth2_client package to allow the user to connect the app with their Intuit Quickbooks account. The app correctly opens the authentication window and allows the user to log in to their Quickbooks.
ISSUE
After log in, Android navigates back to the app but it doesn't navigate back to the correct screen based on the redirectUri passed to the OAuth2Client, it instead navigates back to the screen where the user initiated the authentication. I can't figure out why this is happening.
And here's BooksmartOAuthHelper (I just made this wrapper so I could use it in a Provider at the top level of my app without having to instantiate the OAuth2Helper):
Also, since Quickbooks requires an http or https scheme, I've set up my callback URI as an App Link. I'm hosting a dummy website on Firebase Hosting (https://booksmart-6870c.web.app) and the web server contains the /.well-known/assetlinks.json so Android knows to redirect these URL calls to my app.
Last possibly interesting piece:
Before I added the " ... " to the AndroidManifest.xml and instead had the same intent-filter in the MainActivity, the authentication wasn't working but after the authentication failed I would still get redirected to my AboutPage with the correct query parameters.
PROBLEM QUESTION
Does anyone know why my app isn't correctly redirecting to the AboutPage (the end of the redirect URI based on my GoRouter)? It's instead redirecting back to the HomePage on the app (where the authentication was initiated). I need to get the query parameters from the redirect URI, but because the redirect URI isn't being handled by my app correctly I'm unable to get those parameters.
The text was updated successfully, but these errors were encountered:
BACKGROUND
I'm relatively new to Flutter and trying to build a new app from scratch (currently just in development and only testing on Android right now) using the oauth2_client package to allow the user to connect the app with their Intuit Quickbooks account. The app correctly opens the authentication window and allows the user to log in to their Quickbooks.
ISSUE
After log in, Android navigates back to the app but it doesn't navigate back to the correct screen based on the redirectUri passed to the OAuth2Client, it instead navigates back to the screen where the user initiated the authentication. I can't figure out why this is happening.
CODE
app_routes.dart
The authentication is initiated with this code from my HomeScreen:
And here's BooksmartOAuthHelper (I just made this wrapper so I could use it in a Provider at the top level of my app without having to instantiate the OAuth2Helper):
The authentication window correctly pops up when authenticateOAuth2Helper is called and allows the user to log in.
Here's my custom OAuth2Client:
Here's a code snippet from my AndroidManifest.xml:
Also, since Quickbooks requires an http or https scheme, I've set up my callback URI as an App Link. I'm hosting a dummy website on Firebase Hosting (https://booksmart-6870c.web.app) and the web server contains the /.well-known/assetlinks.json so Android knows to redirect these URL calls to my app.
Last possibly interesting piece:
Before I added the " ... " to the AndroidManifest.xml and instead had the same intent-filter in the MainActivity, the authentication wasn't working but after the authentication failed I would still get redirected to my AboutPage with the correct query parameters.
PROBLEM QUESTION
Does anyone know why my app isn't correctly redirecting to the AboutPage (the end of the redirect URI based on my GoRouter)? It's instead redirecting back to the HomePage on the app (where the authentication was initiated). I need to get the query parameters from the redirect URI, but because the redirect URI isn't being handled by my app correctly I'm unable to get those parameters.
The text was updated successfully, but these errors were encountered: