-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: added migration section about new OAuth screens [skip test]
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,47 @@ Your JWT can now be issued [as usual](https://kalisio.github.io/skeleton/guides/ | |
"sub": "[email protected]" | ||
} | ||
``` | ||
::: | ||
|
||
👉 New `KOAuthLoginScreen` and `KOAuthLogouScreen` components to be used in your app when relying on an OAuth provider instead of local authentication. | ||
|
||
::: details ⬇️ Example of configurations to be used to allow single login/logout with a `keycloak` provider | ||
```js | ||
// frontend route.js of your application | ||
{ | ||
login: 'screen/KOAuthLoginScreen', | ||
'logout/:provider?': { | ||
name: 'logout', | ||
component: 'screen/KOAuthLogoutScreen', | ||
... | ||
}, | ||
... | ||
} | ||
// frontend default.js of your application | ||
screens: { | ||
login: { | ||
actions: [ | ||
{ id: 'keycloak-link', label: 'screen.LOGIN_WITH_KEYCLOAK', renderer: 'form-button', route: { url: '/oauth/keycloak' } } | ||
] | ||
} | ||
}, | ||
leftPane: { | ||
content: [ | ||
..., | ||
{ id: 'logout', icon: 'las la-sign-out-alt', label: 'sideNav.LOGOUT', route: { name: 'logout', params: { provider: 'keycloak' } }, renderer: 'item' } | ||
] | ||
}, | ||
... | ||
|
||
// backend default.js of your application | ||
authentication: { | ||
oauth: { | ||
keycloak: { | ||
..., | ||
logout_url: `${keycloakBaseUrl}/logout` | ||
} | ||
} | ||
... | ||
} | ||
``` | ||
::: |