I need help in clearing the user session in an Auth0 flutter app.
The problem is I have gone through the necessary procedures but whenever I log out from the app and log in again, I'm unable to enter the credentials to log me back into the app. It just logs me in as if the user session has been stored somewhere even after calling the secureStorage.deleteAll() function. I added the login prompt but the problem still persists.
Any help will be deeply appreciated
EDIT...
I'm using flutter_secure_storage and flutter_appauth packages
Clearing the application session is not enough, logout also from Auth0.
See step 2. Auth0 Session Layer for details.
Related
I have developed an app that should allow users to login with their Google account using Firebase authentication. However, after I run the app and try to log in, the account is taken and I see that it is present in the Firebase authentication, but the app does not navigate to the home page. What is wrong with my code?
Background:
I have followed the steps provided in the Firebase documentation for integrating Google sign-in with Firebase authentication. I have also tried to troubleshoot the issue by checking for syntax errors and debugging the code, but it still does not work.
Please provide the code or relevant portions of the code that you have written for the authentication process to better understand the issue and provide a solution.
I was following the active-directory-b2c-ios-swift-native-msal sample code. All was fine but when invoking edit profile flow, I was asked to enter credentials again. It was like B2C couldn't recognize that I was already authenticated and prompted me every time I went to the edit profile user flow. In comparison, this ms-identity-b2c-javascript-spa Javascript SPA works. So I don't think it's my B2C configuration.
This happened to both simulator and real device with iOS 14.x. (I didn't try previous version of iOS.) Has anyone encountered the same issue? I doubt this is the intended behavior of the sample code. Anyone aware of a solution? Thanks for the help.
As part of the call to edit profile, pass in a loginHint parameter with value set to the users identifier (usually their email). I believe otherwise, in the absence of loginHint, MSAL iOS will pass in prompt=login and causes the cookies to get cleared, forcing the user to login again. The object that contains loginHint is MSALInteractiveTokenParameters.
I have a hybrid app which uses Ionic and IBM's Mobilefirst platform. During login we get a cookie from the authentication service. I have to remove this cookie on logout or next time the user can log in even with incorrect credentials.
So during logout I call WL.Client.reloadApp() before going back to login screen. This clears the cookies and then login works correctly in Android and browsers. But in iOS cookies aren't cleared on reload and having searched I came across a solution to clear cookies using native code.
But my confusion is where do I add this native code? There are a few initialization methods in my application's default .m file. I have tried adding the code to clear cookies in -(void)wlInitDidCompleteSuccessfully. But this block doesn't seem to be executed on reloading.
Any suggestion on what I should try to fix this problem.
Two options:
Use the WL.Client.deleteCookie(name) API to clear the cookie.
Write a simple Cordova plugin (https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/adding-native-functionality/) to clear the cookies or google for 'cordova clear cookies' to find such plugins in the market.
So I am using the Facebook SDK with Unity -
Two Questions:
1 - I am assuming that the SDK will cache the Token so that, the next time I launch the app the user is already signed in, correct, or do I have to cache the token myself?
2 - When I try to login with the Editor in run mode (debugger), I get prompted with the "Mock Login Dialog".
I would like to test the scenario that the user is already logged in Facebook is there a way for me to set a debug token and avoid the mock dialog to show up?
Thanks.
I have added a login button to my site anad added scope to publish actions as per guide i found here: developers.facebook.com/docs/reference/plugins/login/ and this works fine but my question is: How can i have same function but this prompt to show to users without needing to click on the Login Button.
If user has not installed app, he would be prompted automatically to install it.
Thanks for any help.
Use FB.getLoginStatus of the JavaScript SDK to see if you have a user connected to your app visiting your page. If not, redirect them to the server-side auth dialog (using client-side auth would not be a good idea, since most browsers will block a popup that’s opened without any actual user interaction).