There is a verification link in activity. On clicking that link gmail app opens.User can verify through that mail. Now when users opens that activity again, the verification link should stay or go according to the response from api. The issue is after opening the activity,link disappears after fraction of second giving a flicker effect. I wan't that when activity is opened, if verification is true, link doesn't appear
Related
We recently integrated AppAuth into our application to automate the OAuth2 authorization code flow. When user wants to login, he is first redirected to our auth server, where he proceeds with the login, and then gets redirected back to the application.
We use chrome-custom-tabs to for opening the login page (AppAuth). The problem is that it sometimes gets stuck at a blank screen (chrome tab displays just blank page without the rendered site or redirect). This happens when the user already has a session in the browser so the tab should close automatically and redirect user back to the application (authenticated). It does not behave consistently and we only experience this issue sometimes (~50/50).
I am happy to add some code but don't know where to start (trying to avoid wall of text). Is there a known issue or caveat?
We tried switching contexts as described here but kept experiencing the same issue.
Lead maintainer of AppAuth here. This is most likely happening because the authorization redirect is happening without any user interaction. Chrome enforces a policy that it will only send redirects to your app if the redirect was triggered by a user action, such as submitting a form that redirects or clicking on a link.
If the IDP you are integrating with supports it, you can pass "prompt=consent" as a parameter to force user interaction. Alternatively, you can set up an intermediary page that captures the redirect and displays a "welcome back" message, with a link or button to return to your app.
Another way is to make the user, use the login screen each time.
just add ".setPrompt("login")" to the authRequestBuilder.
so mine will be:
val authRequest = authRequestBuilder
.setPrompt("login")
.build()
I have an app in which a user has to sign up/ sign in to view content (the destination link).
Currently, when I create a dynamic link in the firebase console, and I open the link on the android device, the link directs to the playstore as expected. After installing the app, the playstore says continue, after which the content view is directly opened, instead of waiting for my call of AppInvite.AppInviteApi.getInvitation() in another activity, post sign in / sign up.
I do have autoLinkOpen set to true, but I suppose the link should be auto launched after my call to AppInvite.AppInviteApi.getInvitation()
Edit: I'm observing that this happens only after tapping on 'Continue' in playstore, post installing the app. If, the playstore is closed after installing the app, and the app is launched from the home screen launcher, the process works perfectly fine.
Any ideas on how to fix this situation ?
I finally found a work around. I'm directing my deeplink to a specific activity which will handle all the deeplinks and route them appropriately. In this activity, I'm checking if the user has logged in. If not, I cache the deeplink url in a pref. Then, before doing my getInvitation method call, I'm checking if any deeplink has been cached in the pref. If so, I open that deeplink appropriately.
I have an app that, when a user sign up, sends an email for activation. When the user taps that link my app starts overlapping the mail app instead of opening or bringing to front the one that the user used to sign up. Is there a way for the link to open or brings to front the one that the user used?
I have Activity with the authorization form, after user authentication creating new Activity.
Next, close the application and start again. Again, a window with the authorization form.
How to make that opened immediately following window after window with authorization if the user has previously logged on?
p.s Sorry for my English.
I would structure the app differently. I would start the app with your "next" activity - the actual app functionality. In its onCreate, I would check whether the authorisation has been completed in the past. If yes, just continue with the app. If not, then open a dialog or start another activity for authentication.
I have a twitter application which uses Sign-in with twitter.
It's 'Settings' screen opens an instance of web browser which goes to twitter, asks the user to authenticate my client application, and comes back to the 'Settings' page after redirection from twitter.
Every other thing with twitter and else works fine, except this:
After the authentication, when the control has come back into the 'Settings' activity, the browser instance remains opened.
This causes hindrance in the UI experience whenever the user navigates away from the 'Settings' activity by back button, after logging in.
Pressing the back button takes the user to the web browser instead of taking her to the activity she was at before coming to 'Settings' activity.
Is there any way to get rid of this?
Can I pass any flag with the intent that opens the browser so that the browser knows that it has to close or has not to be there in the view stack of my application?
or any other solution?
Thanks!
Is there any chance you can use a WebView instead of starting the browser with an Intent? That way, you have full control over it and can close it whenever you want.