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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2] [Backend] As a user I can login with an OAuth provider #19

Merged
merged 19 commits into from Sep 27, 2022

Conversation

olivierobert
Copy link
Member

@olivierobert olivierobert commented Sep 16, 2022

Close #2

What happened 馃憖

  • Add API endpoint to login with Google
  • Store session in a cookie
  • Store user in the database
  • Add unit test and test coverage reporting

Insight 馃摑

Using passport as it is framework agnostic comparedto https://next-auth.js.org/. However, we must pin the version of passport to 0.5.3 as there is an issue with many cookie packages with the latest stable of 0.6.0 (see issue).

https://github.com/vvo/iron-session is used to manage cookies.

The implementation leverages two types of middleware:

For the ORM and database client, https://github.com/prisma/prisma is set up and used.

Proof Of Work 馃摴

Login Flow

2565-09-27 14 59 51

Stored Cookie

image

@olivierobert olivierobert marked this pull request as ready for review September 27, 2022 08:01
@olivierobert olivierobert merged commit 4d014fd into develop Sep 27, 2022
@olivierobert olivierobert deleted the feature/2-backend-oauth-login branch September 27, 2022 08:02
@olivierobert olivierobert added this to the 0.1.0 milestone Sep 27, 2022
@olivierobert olivierobert mentioned this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backend] As a user I can login with an OAuth provider
1 participant