-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error trying to load auth webview activity with application context #521
Comments
This has already been reported here: #479 The |
thank you for your response, is it possible to be allowed to pass custom defined |
@elkhoudiry If your intention is to pass Moreover, we are considering for future implementation of the WebAuthProvider to receive a |
Yes, implementing Activity Results api will make the sdk tied tightly to the activity, |
One last thing before closing the issue when chrome is default browser and the WebAuthProvider get valid credentials it takes me back to the app, but when firefox is default browser, it redirect to a white screen that have "Not found" in it, and i have to click on the firefox tab "3 vertical dots" menu and choose from it "Open in app" and then choose my application, so it takes me back inside my application and then the application continues normally |
Hey @elkhoudiry , @lbalmaceda , I've reported this "not found" behaviour here: https://community.auth0.com/t/google-sign-in-integration-in-android-app-simply-stopped-working/70975 but found a solution in stack overflow this morning: https://stackoverflow.com/questions/2665796/android-handle-oauth-callback-using-intent-filter It would be interesting to understand exactly what is happening and why it used to work with |
Thank you for sharing that, i will try it asap, But I'd like to understand why chrome custom tabs is working correctly and firefox tabs behaving this way |
@elkhoudiry We've also experienced that 404 page in the past with other browsers than Chrome (not just firefox) and still don't understand the conditions for that to happen. We did see that using a custom scheme instead of "https" for the callback URL helped in fixing that behavior, but the caveat is that it removes the ability to use "Android App Links" (domain verification, etc). Another issue like this was reported here: #488 |
I see, i will try to workaround that too, Well while exploring around, i found that there is auth0.lock that can be used to authenticate users but from a native activity that can be visually and language customized Can i use that |
Embedded authentication, like the one provided via Lock when you type your username/password, is discouraged nowadays. Users would prefer to type their credentials in a trusted application, as their browser apps for example, instead of in your apps' form (Lock). Anyway, social authentication via that library is delegated to the You can read about the differences in this article that while it focused on web apps, it can also be applied to mobile. And about web auth vs embedded, you might also find interesting this blog post https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html. |
Got it, thank you for your clarification |
Basically this is my setup, i'm using
ViewModel
which has a login feature that that callslogin()
function fromAuth0Repository
interface usingWebAuthProvider
also using a dagger hilt provider for providing app level dependencies for
Auth0
,AuthenticationAPIClient
, etcEverything is working alright and clean , i can call
login()
function with no paramaters and dagger hilt injects the dependencies for me, but passing context to loginWebAuthProvider
is a challengeWhen i'm leaving the context to dagger hilt so it can inject an
ApplicationContext
i get this errorAuth0.Android/auth0/src/main/java/com/auth0/android/provider/AuthenticationActivity.kt
Line 101 in 9bbee00
can this flag
FLAG_ACTIVITY_NEW_TASK
be added to auth0 sdk ?PS: Injecting
@ActivityContext
won't work cuzViewModel
outlives activity, which will make the application doesn't combileThe text was updated successfully, but these errors were encountered: