logto_core
library
Enums
FirstScreen
The first screen to be shown in the sign-in experience.
IdentifierType
The type of the identifier supported by Logto.
This field is used along with FirstScreen to specify the first screen to be shown in the sign-in experience.
If specified, the first screen will be shown based on the identifier type.
InteractionMode
@Deprecated use firstScreen instead
LogtoAuthExceptions
LogtoReservedResource
Resources that reserved by Logto, which cannot be defined by users.
LogtoUserScope
Scopes for ID Token and Userinfo Endpoint.
Functions
buildOrganizationUrn (String organizationId )
→ String
Build the organization URN from organization ID.
fetchOidcConfig (Client httpClient , String endpoint )
→ Future <OidcProviderConfig >
Fetch the OIDC provider configuration.
fetchTokenByAuthorizationCode ({required Client httpClient , required String tokenEndPoint , required String code , required String codeVerifier , required String clientId , required String redirectUri , String ? resource })
→ Future <LogtoCodeTokenResponse >
Fetch token using the authorization code.
fetchTokenByRefreshToken ({required Client httpClient , required String tokenEndPoint , required String clientId , required String refreshToken , String ? resource , String ? organizationId })
→ Future <LogtoRefreshTokenResponse >
Fetch token using the refresh token.
fetchUserInfo ({required Client httpClient , required String userInfoEndpoint , required String accessToken })
→ Future <LogtoUserInfoResponse >
Fetch user info using the access token.
generateSignInUri ({required String authorizationEndpoint , required dynamic clientId , required String redirectUri , required String codeChallenge , required String state , String prompt = _prompt , List <String > ? scopes , List <String > ? resources , String ? loginHint , InteractionMode ? interactionMode , String ? directSignIn , FirstScreen ? firstScreen , List <IdentifierType > ? identifiers , })
→ Uri
Generate the sign-in URI (Authorization URI).
This URI will be used to initiate the OIDC authentication flow.
generateSignOutUri ({required String endSessionEndpoint , required String clientId , Uri ? postLogoutRedirectUri })
→ Uri
Generate the sign-out URI (End Session URI).
getOrganizationIdFromUrn (String organizationUrn )
→ String
isValidDirectSignInFormat (String ? directSignIn )
→ bool
Verify the direct sign-in parameter format.
revoke ({required Client httpClient , required String revocationEndpoint , required String clientId , required String token })
→ Future <void >
Revoke the token.
verifyAndParseCodeFromCallbackUri (String callbackUri , String redirectUri , String state )
→ String
A utility function to verify and parse the code from the authorization callback URI.