tcb-secure-auth v2.4.2
Secure Auth UI Library
This Library was generated Angular 16.1.4. This project is used to provide common functions that needs to be used to provide direct solutions without any dependency with okta library for BFF Pattern
If library is throwing error then
Add this to your compiler options in the app.
tsconfig.json
"compilerOptions": {
.....
"skipLibCheck": true,
....
}
Installation
After installing Secure Auth Library using command npm i tcb-secure-auth
If dependencies not installed automatically. Please use this command to install dependencies npm i base64-arraybuffer crypto-random-string
Inject configuration from module
Import the module file inside the component import { SecureAuthUiModule } from "tcb-secure-auth"
and declare it inside the
@NgModule({
imports: [
SecureAuthUiModule.forRoot({
configuration: { client_id: "",redirect_uri: "",oidc_domain_url: "",bff_api_url: "",redirect_landing: "",oidc_provider: ""}
})
],
})
Import Service in Component
Import the service file inside the component import { SecureAuthUiService } from "tcb-secure-auth"
and declare it inside the constructor constructor(private auth: SecureAuthUiService) { }
Functions Exposed
Once injected it can be used as a normal service. Below are the functions that are exposed.
signWithRedirect(config)
signWithRedirect() expects config needs to be passed from module forRoot. Below is the config it expects
Example:this.auth.signInWithRedirect()
signOut()
signOut() is for Okta. It expects config needs to be passed from module forRoot. Below is the config it expects
Example: this.auth.signOut()
refreshAuthToken()
refreshAuthToken() is for Auth0. It expects config needs to be passed from module forRoot. Below is the config it expects
Example:this.auth.refreshAuthToken()
generateCryptoString(number)
generateCryptoString(number) expects character limit to be sent to generate to a random ASCII string
Example:generateCryptoString(32)
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago