fix(core): Corrected typos and added missing keywords.
This commit is contained in:
@@ -27,7 +27,7 @@ import * as domtools from '@design.estate/dees-domtools';
|
||||
import { html, render } from '@design.estate/dees-element';
|
||||
import { IdpWelcome } from './elements/idp-welcome.js';
|
||||
|
||||
// Define asynchronous run function
|
||||
// Define an asynchronous run function
|
||||
const run = async () => {
|
||||
// Set up DOM tools
|
||||
const domtoolsInstance = await domtools.DomTools.setupDomTools();
|
||||
@@ -56,10 +56,10 @@ const run = async () => {
|
||||
},
|
||||
});
|
||||
|
||||
// Set up service worker
|
||||
// Set up the service worker
|
||||
const serviceWorker = await serviceworker.getServiceworkerClient();
|
||||
|
||||
// Render main template
|
||||
// Render the main template
|
||||
const mainTemplate = html`
|
||||
<style>
|
||||
body {
|
||||
@@ -79,7 +79,7 @@ run();
|
||||
|
||||
### Using the IDP Client
|
||||
|
||||
The IDP Client is essential to communicate with the IDP server. Below is a sample on how to set up and use the IDP client:
|
||||
The IDP Client is essential to communicate with the IDP server. Below is a sample of how to set up and use the IDP client:
|
||||
|
||||
```typescript
|
||||
import { IdpState } from './idp.state.js';
|
||||
@@ -99,7 +99,7 @@ export class IdpDemo {
|
||||
username: 'user@example.com',
|
||||
password: 'password123',
|
||||
});
|
||||
if(response.refreshToken) {
|
||||
if (response.refreshToken) {
|
||||
await idpClient.storeJwt(response.jwt);
|
||||
console.log("Logged in successfully, JWT stored.");
|
||||
} else {
|
||||
@@ -176,7 +176,7 @@ export class IdpRegistrationStepper extends plugins.DeesElement {
|
||||
last_name: formData.LastName,
|
||||
},
|
||||
});
|
||||
// Proceed to next steps as per the registration flow
|
||||
// Proceed to the next steps as per the registration flow
|
||||
}
|
||||
|
||||
private renderErrorMessage(message: string) {
|
||||
@@ -219,7 +219,7 @@ export class OrganizationManager {
|
||||
organizationSlug: slug,
|
||||
action: 'manifest',
|
||||
});
|
||||
if(response.resultingOrganization) {
|
||||
if (response.resultingOrganization) {
|
||||
console.log(`Organization ${name} created successfully.`);
|
||||
} else {
|
||||
console.log(`Organization creation failed.`);
|
||||
@@ -247,7 +247,7 @@ export const refreshJwt = async (client: IdpClient) => {
|
||||
const response = await client.requests.refreshJwt.fire({
|
||||
refreshToken: currentJwt.data.refreshToken
|
||||
});
|
||||
if(response.jwt) {
|
||||
if (response.jwt) {
|
||||
await client.storeJwt(response.jwt);
|
||||
console.log("JWT refreshed and stored.");
|
||||
return response.jwt;
|
||||
@@ -290,7 +290,7 @@ const idpClient = new IdpClient('https://reception.lossless.one/typedrequest');
|
||||
getTransferToken(idpClient);
|
||||
```
|
||||
|
||||
This comprehensive guide should help you with a detailed understanding of setting up and using the `@idp.global/idp.global` module effectively.
|
||||
This comprehensive guide should help you understand the detailed setup and usage of the `@idp.global/idp.global` module effectively.
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
|
||||
Reference in New Issue
Block a user