Frontmatter
| id | 4051 |
| title | Keycloak integration |
| state | Closed |
| labels | enhancement |
| assignees | [] |
| createdAt | Feb 13, 2023, 6:32 PM |
| updatedAt | Mar 4, 2023, 11:38 AM |
| githubUrl | https://github.com/neomjs/neo/issues/4051 |
| author | deniztoprak |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 4, 2023, 11:38 AM |
Keycloak integration

Dinkh
Feb 14, 2023, 4:56 PM
Hi @deniztoprak,
can you provide me:
- the neo project you want to use with keycloak (if possible)
- the api commands you would like to use
That way I can create the part you are looking for:
- import the script
- give you access to various commands of keycloak

deniztoprak
Mar 4, 2023, 11:38 AM
- It's a client project which uses single sign-on with Keycloak.
- I wanted to use Keycloak.js API. The official JS implementation of Keylcloak. It requires
windowsobject to setup an iFrame which redirects users to the login page.
The integration would be possible over a Neo plugin but I opted for a custom solution which doesn't require Keycloak.js. I used a backend endpoint to redirect the users to the login page through HTML redirect (302). I think it's better to avoid a dedicated plugin here since it'd be a very specific use case to implement in the core library. Thank you anyway for your help, I'm closing this issue now.
deniztoprak closed this issue on Mar 4, 2023, 11:38 AM
Is your feature request related to a problem? Please describe. I want to use keycloak Js adapter into my Neo project.
Describe the solution you'd like Creating an add-on for keycloak seems to be the right way to use it. The add-on will have access to global context, especially to
documentandwindowobjects which are needed by the adapter. The app-worker will get a remote access to retrieve the bearer token and login/logout methods.Describe alternatives you've considered I've considered 2 alternatives:
<script>element: This doesn't work either since the keycloak object is stored intowindowand not accessible from the app-worker.Additional context I'm thinking to configure the add-on over
neo-config.json.