userProfile method
Fetches the user's profile from the /userinfo endpoint. An accessToken
from a successful authentication call must be supplied.
Endpoint
https://auth0.com/docs/api/authentication#user-profile
Usage example
final result = await auth0.api.login({
usernameOrEmail: 'my@email.com',
password: 'my_password'
connectionOrRealm: 'Username-Password-Authentication'
});
final profile = await auth0.api.userProfile({
accessToken: result.accessToken
});
Implementation
Future<UserProfile> userProfile(
{required final String accessToken,
final Map<String, String> parameters = const {}}) =>
Auth0FlutterAuthPlatform.instance.userInfo(_createApiRequest(
AuthUserInfoOptions(
accessToken: accessToken, parameters: parameters)));