diff --git a/example/src/App.tsx b/example/src/App.tsx index 2e623fbf..0f354c9e 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -15,7 +15,7 @@ const Home = () => { const { authorize, clearSession, user, getCredentials, error } = useAuth0(); const onLogin = async () => { - await authorize({ scope: 'openid profile email' }, {}); + await authorize(); const credentials = await getCredentials(undefined, 0, {}); Alert.alert('AccessToken: ' + credentials?.accessToken); }; @@ -23,7 +23,7 @@ const Home = () => { const loggedIn = user !== undefined && user !== null; const onLogout = async () => { - await clearSession({ federated: true }, {}); + await clearSession(); }; return ( diff --git a/src/hooks/auth0-context.ts b/src/hooks/auth0-context.ts index de7e5bec..c6bd03be 100644 --- a/src/hooks/auth0-context.ts +++ b/src/hooks/auth0-context.ts @@ -25,8 +25,8 @@ export interface Auth0ContextInterface * @param options Options for customizing the SDK's handling of the authorize call */ authorize: ( - parameters: WebAuthorizeParameters, - options: WebAuthorizeOptions + parameters?: WebAuthorizeParameters, + options?: WebAuthorizeOptions ) => Promise; /** * Start the passwordless SMS login flow. See {@link Auth#passwordlessWithSMS} @@ -35,7 +35,9 @@ export interface Auth0ContextInterface /** * Authorize the user using a SMS code. See {@link Auth#loginWithSMS} */ - authorizeWithSMS: (parameters: LoginWithSMSOptions) => Promise; + authorizeWithSMS: ( + parameters: LoginWithSMSOptions + ) => Promise; /** * Start the passwordless email login flow. See {@link Auth#passwordlessWithEmail} */ @@ -43,7 +45,9 @@ export interface Auth0ContextInterface /** * Authorize the user using an email code. See {@link Auth#loginWithEmail} */ - authorizeWithEmail: (parameters: LoginWithEmailOptions) => Promise; + authorizeWithEmail: ( + parameters: LoginWithEmailOptions + ) => Promise; /** * Send a challenge for multi-factor authentication. See {@link Auth#multifactorChallenge} */ @@ -53,11 +57,15 @@ export interface Auth0ContextInterface /** * Authorize the user using an Out Of Band authentication code. See {@link Auth#loginWithOOB} */ - authorizeWithOOB: (parameters: LoginWithOOBOptions) => Promise; + authorizeWithOOB: ( + parameters: LoginWithOOBOptions + ) => Promise; /** * Autohrize the user using a One Time Password code. See {@link Auth#loginWithOTP}. */ - authorizeWithOTP: (parameters: LoginWithOTPOptions) => Promise; + authorizeWithOTP: ( + parameters: LoginWithOTPOptions + ) => Promise; /** * Authorize the user using a multi-factor authentication Recovery Code. See {@link Auth#loginWithRecoveryCode} */ @@ -76,8 +84,8 @@ export interface Auth0ContextInterface * @param options Options for configuring the SDK's clear session behaviour. */ clearSession: ( - parameters: ClearSessionParameters, - options: ClearSessionOptions + parameters?: ClearSessionParameters, + options?: ClearSessionOptions ) => Promise; /** * Gets the user's credentials from the native credential store. If credentials have expired, they are automatically refreshed