0.1.0-alpha.9 • Published 3 months ago
oidc-client-rx v0.1.0-alpha.9
Quick Start
@TODO Add More Details
Install
pnpm add oidc-client-rx @outposts/injection-js @abraham/reflection
# npm install oidc-client-rx @outposts/injection-js @abraham/reflection
# yarn add oidc-client-rx @outposts/injection-js @abraham/reflection
Basic Usage
import '@abraham/reflection'; // or 'reflect-metadata' | 'core-js/es7/reflect'
import { type Injector, ReflectiveInjector } from '@outposts/injection-js';
import { LogLevel, OidcSecurityService, provideAuth, withDefaultFeatures } from 'oidc-client-rx';
const injector = ReflectiveInjector.resolveAndCreate(
provideAuth(
{
config: {
authority: '<your-authority>',
redirectUrl: `${window.location.origin}/auth/callback`,
postLogoutRedirectUri: window.location.origin,
clientId: '<your-client-id>',
scope: 'openid profile email offline_access',
responseType: 'code',
silentRenew: true,
useRefreshToken: true,
logLevel: LogLevel.Debug,
...
},
},
withDefaultFeatures()
)
) as Injector;
const oidcSecurityService = injector.get(OidcSecurityService);
oidcSecurityService.checkAuth().subscribe((result) => {
console.debug('checkAuth result: ', result);
});
const isAuthenticated$ = oidcSecurityService.isAuthenticated$;
More Examples
License
0.1.0-alpha.9
3 months ago
0.1.0-alpha.8
3 months ago
0.1.0-alpha.7
3 months ago
0.1.0-alpha.6
4 months ago
0.1.0-alpha.5
4 months ago
0.1.0-alpha.4
4 months ago
0.1.0-alpha.3
4 months ago
0.1.0-alpha.0
4 months ago
0.1.0-alpha.2
4 months ago
0.1.0-alpha.1
4 months ago