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

Implement support for Auth0 both in API and normal login #3125

Merged
merged 19 commits into from
Feb 24, 2024

Conversation

henrikhorluck
Copy link
Member

  • Support Auth0 export
  • Move API-auth to Auth0 JWT
  • Support login with Auth0 in normal OW4
  • Remove ways to edit a user-profile

Description of changes

Code Checklist

  • I have added tests
  • I have provided documentation

Visual changes

Before
After

scripts/management/commands/auth0_export.py Dismissed Show dismissed Hide dismissed
scripts/management/commands/auth0_export.py Dismissed Show dismissed Hide dismissed
Design is a TODO, and now a _lot_ of stuff should be removed
Only exposed a single endpoint to make an invite-link to the slack
workspace, but has been failing for who knows how long.

Just remove it, essentially unused.
This was intended to be used as a new source-of-truth or something for
the lists in Google Workspace.

The sync was never implemented.

We do not want more data sync.

Remove it.
It is the _same_ as `.email`, and with the change to Auth0 we will only
have one email on the accounts.
For some reason we had both `/profile/emails` and `/user/emails`, which
appear to just duplicate functionality, while the `/user`-one allowed us
to change it?

Either way: we can already directly modify `.email` through e.g.
UserUpdateViewSet, so no need to make a new endpoint.
The email-sending appears to not actually result in emails being sent?

This should maybe have some more error-handling?
This is mostly relevant if you get directed after logout with Auth0
- Support creating a user with info from /userinfo
    - Including from API-call by chaning DRF-auth to mozilla
- Username is a variant of the email, note that this might lead to
  usernames that were previously invalid.
- Verify that access_token-audience is for us
- Do not call /userinfo on _every_ request, since we can find the user
  from `sub`, but use it if we need to create a new user
- Update email if it has diverged when we have already gotten an
  id_token (aka login directly to OW4)
@henrikhorluck henrikhorluck added this pull request to the merge queue Feb 24, 2024
Merged via the queue into main with commit 73be636 Feb 24, 2024
6 checks passed
@henrikhorluck henrikhorluck deleted the feat/yeet-cognito branch February 24, 2024 16:21
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.

None yet

1 participant