Skip to content
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

fix: Server-side eIAM session termination #1727

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

bprusinowski
Copy link
Collaborator

Fixes #1691

This PR fires a request to eIAM servers when user signs out, to also terminate the session on their side.

As we can't connect to eIAM infrastructure from localhost, I wasn't able to test out if this works – we would be able to do so when the change is deployed to TEST.

It would be extremely helpful to be able to connect to e.g. TEST eIAM auth server to work on such issues. @adintegra @ptbrowne do you know if we have such access, maybe I missed this? If not, could we potentially request it?

Copy link

vercel bot commented Sep 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 6:37am

@adintegra
Copy link
Contributor

It would be extremely helpful to be able to connect to e.g. TEST eIAM auth server to work on such issues

@bprusinowski localhost should be whitelisted in eIAM TEST so should be testable. From your description, I'm not 100% sure if this is the configuration you tested against (https://feds-r.eiam.admin.ch/realms/uvek_bafu-visualize/.well-known/openid-configuration)?

Copy link
Contributor

@noahonyejese noahonyejese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally the authentication needs to be more easily accessable during dev.

@bprusinowski
Copy link
Collaborator Author

@adintegra I believe so, I used the same env variables that are defined in GitLab that deploys to TEST. Are you able to authenticate successfully from your machine?

@adintegra
Copy link
Contributor

Are you able to authenticate successfully from your machine?

@bprusinowski yes, it's testable. What's critical is this var (which is different from the deployment environment):

NEXTAUTH_URL=https://localhost:3000

Also, ensure you run npm run dev:ssl to get SSL support :)

@bprusinowski
Copy link
Collaborator Author

Thanks @adintegra 💯 I'll add this to README, I missed this part 🥲

@adintegra
Copy link
Contributor

Thanks @bprusinowski! Yes, the documentation on the specifics was a bit sparse – sorry for that.

@bprusinowski
Copy link
Collaborator Author

No problem @adintegra! In fact, we already had the yarn dev:ssl in the docs, but missed NEXTAUTH_URL in .env.development. I've updated both to mention this 👍

@bprusinowski bprusinowski merged commit 296411f into main Sep 9, 2024
5 of 6 checks passed
@bprusinowski bprusinowski deleted the chore/eiam-session-termination branch September 9, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✅ Cleanly terminate eIAM session
3 participants