9.0.0 • Published 4 months ago

@guardian/identity-auth-frontend v9.0.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
4 months ago

IdentityAuthFrontend

A wrapper around @guardian/identity-auth which manages creating and configuring a IdentityAuth singleton to be used solely on www.theguardian.com by DCR, Frontend, and Commercial.

Usage

import { getIdentityAuth } from '@guardian/identity-auth-frontend';

const identityAuth = getIdentityAuth();

// Check if the user is logged in and return the current auth state
const authState = await identityAuth.isSignedInWithAuthState();

authState.isAuthenticated; // true or false
authState?.accessToken; // the user's access token object
authState?.idToken; // the user's id token object

// or boolean only
const isLoggedIn = await identityAuth.isSignedIn();
8.1.0

8 months ago

6.0.3

10 months ago

6.0.2

10 months ago

7.0.0

9 months ago

8.0.1

8 months ago

8.0.0

8 months ago

9.0.0

7 months ago

6.0.1

11 months ago

5.0.0

1 year ago

6.0.0

1 year ago

4.0.1

1 year ago

4.0.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago