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

Feat: implement OAuth/OIDC sign on with Authlib #414

Merged
merged 33 commits into from
Apr 15, 2022
Merged

Feat: implement OAuth/OIDC sign on with Authlib #414

merged 33 commits into from
Apr 15, 2022

Conversation

thekaveman
Copy link
Member

@thekaveman thekaveman commented Apr 10, 2022

Closes #375.

Replaces #407 (we're doing this all on the server now).
Replaces #409 (we don't need Django's auth system/user models).

Reviewing this PR / after merge

  1. Delete django.db: rm django.db
  2. Update .env with new variables / values from CDT sample
  3. Rebuild app container cd .devcontainer docker compose build --no-cache client
  4. Rebuild devcontainer docker compose build --no-cache dev

See more at https://docs.calitp.org/benefits/configuration/oauth

@thekaveman thekaveman added this to the Login.gov SSO milestone Apr 10, 2022
@github-actions github-actions bot added the deployment-dev [auto] Changes that will trigger a deploy if merged to dev label Apr 10, 2022
@thekaveman thekaveman changed the title Feat: implement OAuth/OIDC with Authlib Feat: implement OAuth/OIDC sign on with Authlib Apr 11, 2022
@thekaveman thekaveman mentioned this pull request Apr 11, 2022
3 tasks
@thekaveman thekaveman marked this pull request as ready for review April 11, 2022 18:50
@thekaveman thekaveman requested a review from a team as a code owner April 11, 2022 18:50
Copy link
Member

@angela-tran angela-tran left a comment

Choose a reason for hiding this comment

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

This approach looks good to me! I noticed a few things causing errors, so I left suggestions as well as a question.

benefits/eligibility/views.py Outdated Show resolved Hide resolved
benefits/oauth/urls.py Outdated Show resolved Hide resolved
benefits/oauth/views.py Outdated Show resolved Hide resolved
Copy link
Contributor

@afeld afeld left a comment

Choose a reason for hiding this comment

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

We are definitely going to want some tests for this functionality; want to do them in this pull request, or create a separate issue?

benefits/core/migrations/0001_initial.py Show resolved Hide resolved
benefits/eligibility/views.py Outdated Show resolved Hide resolved
benefits/oauth/views.py Outdated Show resolved Hide resolved
benefits/oauth/views.py Outdated Show resolved Hide resolved
benefits/oauth/views.py Outdated Show resolved Hide resolved
benefits/settings.py Show resolved Hide resolved
angela-tran
angela-tran previously approved these changes Apr 13, 2022
afeld
afeld previously approved these changes Apr 14, 2022
Copy link
Contributor

@afeld afeld left a comment

Choose a reason for hiding this comment

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

Will be nice to have this in since so many things hang off of it. My only hesitation with this being merged is if we are unable to log in due to configuration issues with the authorization server. If we're willing to accept that, let's do it!

@thekaveman
Copy link
Member Author

Holding on the merge until everyone can get their local environment configured

angela-tran
angela-tran previously approved these changes Apr 14, 2022
@thekaveman
Copy link
Member Author

Ah, looks like I need to fix the merge conflicts. Will do so.

angela-tran
angela-tran previously approved these changes Apr 14, 2022
Copy link
Member

@angela-tran angela-tran left a comment

Choose a reason for hiding this comment

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

Oh lol, I thought it would let you resolve the merge conflict without needing a re-review, but makes sense! Looks good

@thekaveman thekaveman enabled auto-merge April 14, 2022 23:14
@thekaveman thekaveman disabled auto-merge April 14, 2022 23:14
@thekaveman thekaveman merged commit 93e965b into dev Apr 15, 2022
@thekaveman thekaveman deleted the feat/oauth branch April 15, 2022 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement OIDC sign in flow
3 participants