Skip to content

Latest commit

 

History

History
129 lines (69 loc) · 5.73 KB

samples.md

File metadata and controls

129 lines (69 loc) · 5.73 KB

Samples using this library

Code Flow with PKCE Using a configuration from an http source and silent renew

Sometimes it is required to load the configuration from an http address. You can load the config from your source, map it into the required format and use the withConfig(...) function.

The properties used in this example are just for demo purposes, you can used any definitions.

app.module.ts

app.component.ts

app.component.html

Code Flow PKCE with Refresh tokens

The Code flow with PKCE uses refresh tokens to refresh the session and a the end of the session, the user can logout and revoke the tokens. The demo is setup to use each refresh token only once.

app.module.ts

app.component.ts

app.component.html

Code Flow PKCE Auto login

The example logins the user in directly without a login click using the Code Flow with PKCE and an Auth Guard.

app.module.ts

app.component.ts

app.component.html

auto-login.component.ts

guard.ts

Code Flow with PKCE basic with silent renew

The is the basic example of the Code Flow with PKCE.

app.module.ts

app.component.ts

app.component.html

Azure B2C Code Flow PKCE with Silent renew

The example uses the Code Flow PKCE with Silent renew with Azure B2C as the STS.

app.module.ts

app.component.ts

app.component.html

Azure AD OIDC Code Flow with PKCE

Azure AD sample using OpenID Connect Code Flow with PKCE and a iframe silent renew

app.module.ts

app.component.ts

app.component.html

Implicit Flow with silent renew (Not recommended)

The example uses the Implicit Flow with silent renew. This flow is no longer recommended, but some servers support this flow only, and not the Code flow with PKCE.

app.module.ts

app.component.ts

app.component.html

Implicit Flow google (Not recommended)

The example uses the Implicit Flow with silent renew with google. This flow is no longer recommended, but some servers support this flow only, and not the Code flow with PKCE.

app.module.ts

app.component.ts

app.component.html

Code flow with a lazy loaded module

The example uses the Code flow with silent renew but you authenticate in a lazy loaded module

app.module.ts

app.component.ts

app.component.html

lazy.component.ts

lazy.component.html