I am following the documentation exactly for Native iOS Swift app:
Auth0
.webAuth()
.scope("openid profile")
.audience("myaudience.com/userinfo")
.start {
switch $0 {
case .failure(let error):
// Handle the error
print("Error: \(error)")
case .success(let credentials):
// Do something with credentials e.g.: save them.
// Auth0 will automatically dismiss the login page
print("Credentials: \(credentials)")
}
}
How to fix this automatic signed out.
DO I need to handle this in-app level or some configuration in Auth0 console?
Also, I feel the documentation for Native iOS and Android is not great, please refactor the doc.
I have gone through this,
https://auth0.com/docs/tokens/set-access-token-lifetime
but with the same settings, my android app is working correctly, so I feel there is no wrong configuration in my API/console.
public class Credentials: NSObject, JSONObjectPayload, NSSecureCoding {
/// Token used that allows calling to the requested APIs (audience sent on Auth)
@objc public let accessToken: String?
/// Type of the access token
@objc public let tokenType: String?
/// When the access_token expires
@objc public let expiresIn: Date?
/// If the API allows you to request new access tokens and the scope `offline_access` was included on Auth
@objc public let refreshToken: String?
// Token that details the user identity after authentication
@objc public let idToken: String?
// Granted scopes, only populated when a requested scope or scopes was not granted and Auth is OIDC Conformant
@objc public let scope: String?
What is expiresIn
about does exactly, is it the culprit?
If so please help me to fix this!