-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ember-acmidm-login to v2 #471
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can log in and out with itsme, but the "switch" flow doesn't work. It gives me a 400 BAD REQUEST
this is the request URL:
https://authenticatie-ti.vlaanderen.be/op/v1/logout?switch=true&client_id=68b1585d-0e13-4817-820e-c475207673ed&post_logout_redirect_uri=https%3A%2F%2Fgelinkt-notuleren.lblod.info%2Fauthorization%2Fswitch
these are my environment settings for the frontend:
EMBER_OAUTH_API_KEY: "68b1585d-0e13-4817-820e-c475207673ed"
EMBER_OAUTH_BASE_URL: "https://authenticatie-ti.vlaanderen.be/op/v1/auth"
EMBER_OAUTH_REDIRECT_URL: "https://gelinkt-notuleren.lblod.info/authorization/callback"
EMBER_OAUTH_LOGOUT_URL: "https://authenticatie-ti.vlaanderen.be/op/v1/logout"
EMBER_OAUTH_SWITCH_URL: "https://gelinkt-notuleren.lblod.info/authorization/switch"
EDIT:
turns out I had the wrong switch url, it still needs to be https://gelinkt-notuleren.lblod.info/switch-login
I was confused cause that route was commented out in the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: These last two errors already existed before, but would be nice to get them fixed :) |
My bad, I uncommented the switch-login route, does it work if it is a configured with the switch-login url? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works with local testing 👏
This PR introduces an update to ember-acmidm-login 2.0.0-beta.1. The new version removes the dependency on the outdated torii dependency which is not compatible with ember 4+. The new version of ember-acmidm-login additionally no longer provides UI components.
Aside from the update, this PR introduces a restructure of the auth routes, it provides the following routes:
authorization.login
route: this is a route which sends the user to an acmidm login page or the mock-login pageauthorization.logout
route: this is a route which invalidates the users session and sends them to the dedicated acmidm page, or back to the mock-login pageauthorization.callback
route: this route serves as the callback route where users are sent too after a successful login, it receives acode
parameter and authenticates the userauthorization.switch
route: this route invalidates the current session and sends the user to an acmidm switch url or the mock-login page.TODO:
This restructure is based on lblod/frontend-loket#282.