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
We are using the embedded login in salesforce to log the user in. We have a passive logout function on our member portal that logs the user out after 15 minutes of inactivity where the session is ended and access token is invalidated. We call this single logout function in the connected app (https://xxxxxxx.my.salesforce.com/services/auth/idp/oidc/logout) to log the user out. This works fine on the desktop browser, however on the mobile app when the user goes to log back in after the passive logout they get a blank screen after authentication. This issue is happening in the Authentication webview I believe its caused by a cached session or token. The only fix seems to be to have the user uninstall the App and reinstall the app, however this problem will continuously pop up if they are passively logged out and try to log back in again. As I said it works fine the desktop browser, but in the app authentication webview there must be some disconnect or an invalid session thats being called, its hard to troubleshoot since we aren't really getting an error.
Is there a way to clear the authentication helper webview cache or get a new session?
In our ContentView.swift webview (after authentication) when passive logout happens server side we call this function in our webview to direct the user back to login.
.... webview ....
if url.description.lowercased().contains("logout") {
// Passive logout has been called, navigate app back to the authentication webview.
// swiftlint:disable force_cast
let delegate = UIApplication.shared.delegate as! AppDelegate
AuthHelper.loginIfRequired {
delegate.setupRootViewController()
}
decisionHandler(.cancel)
return
}
I have also tried calling these methods on logout as well in our webview but I still have the same issue
Actual behavior: User Logs in to app successfully, gets passively logged out due to 15 minutes of inactivity. Users gets prompted for biomrics/username password but is directed to a blank screen after authentication.
Expected Behavior: User Logs in to app successfully, gets passively logged out due to 15 minutes of inactivity. Users should be able to log back in to the authenticated experience with biometrics or username and password.
Error Log:
The text was updated successfully, but these errors were encountered:
sortinousn
changed the title
Invalid cookie/token in Authentication webview
Invalid access token in Authentication webview
Jul 9, 2024
I think this issue may be related to #3619. I can confirm via the introspection API that the access token being used is infact invalid. Logging back in via the built in SDK functions in the scenedelegate does not retrieve a new token. I was actually able to reproduce the issue by revoking the token after login and then calling loginifrequired.
Please fill out the following details:
We are using the embedded login in salesforce to log the user in. We have a passive logout function on our member portal that logs the user out after 15 minutes of inactivity where the session is ended and access token is invalidated. We call this single logout function in the connected app (https://xxxxxxx.my.salesforce.com/services/auth/idp/oidc/logout) to log the user out. This works fine on the desktop browser, however on the mobile app when the user goes to log back in after the passive logout they get a blank screen after authentication. This issue is happening in the Authentication webview I believe its caused by a cached session or token. The only fix seems to be to have the user uninstall the App and reinstall the app, however this problem will continuously pop up if they are passively logged out and try to log back in again. As I said it works fine the desktop browser, but in the app authentication webview there must be some disconnect or an invalid session thats being called, its hard to troubleshoot since we aren't really getting an error.
Is there a way to clear the authentication helper webview cache or get a new session?
In our ContentView.swift webview (after authentication) when passive logout happens server side we call this function in our webview to direct the user back to login.
I have also tried calling these methods on logout as well in our webview but I still have the same issue
Actual behavior: User Logs in to app successfully, gets passively logged out due to 15 minutes of inactivity. Users gets prompted for biomrics/username password but is directed to a blank screen after authentication.
Expected Behavior: User Logs in to app successfully, gets passively logged out due to 15 minutes of inactivity. Users should be able to log back in to the authenticated experience with biometrics or username and password.
Error Log:
The text was updated successfully, but these errors were encountered: