Skip to content

Commit

Permalink
docs: added migration section about new OAuth screens [skip test]
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Jan 31, 2025
1 parent 971745f commit 518733a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/guides/migration/v2.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
}
}
...
}
```
:::

0 comments on commit 518733a

Please sign in to comment.