AuthSession
public protocol AuthSession
Defines the auth session behavior
-
True if the current user has signed in
App developers can use this flag to make local decisions about the content to display (e.g., “Should I show this protected page?”) but cannot use it to make any further assertions about whether a network operation is likely to succeed or not.
true
if a user has authenticated, via any of:signIn(username:password:options:)
signInWithWebUI(presentationAnchor:options:)
signInWithWebUI(for:presentationAnchor:options:)
- A plugin-specific sign in method like
AWSCognitoAuthPlugin.federateToIdentityPool(withProviderToken:for:options:)
isSignedIn
remainstrue
until we callAmplify.Auth.signOut
. Notably, this value remainstrue
even when the session is expired. Refer the underlying plugin documentation regarding how to handle session expiry.Declaration
Swift
var isSignedIn: Bool { get }