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: support login via oauth #90

Open
3 tasks
goatfryed opened this issue Dec 6, 2020 · 7 comments
Open
3 tasks

feat: support login via oauth #90

goatfryed opened this issue Dec 6, 2020 · 7 comments
Assignees
Labels
novelty Something completely new

Comments

@goatfryed
Copy link
Contributor

goatfryed commented Dec 6, 2020

I propose to add login via oauth providers.
I'd start with github as a first example case.

If you like the idea, you can assign the issue to me and I'll add it next week.


TODO

@dargmuesli dargmuesli added the feature New feature or request label Dec 7, 2020
@dargmuesli
Copy link
Member

Hey there, great suggestion! And great that you want to work on that 🔥
As I don't yet know all details about OAuth, I'd suggest to have a chat on Discord or on a short call.
The requirements that currently come to my mind are:

  • for users authenticating via OAuth we need at least their email address so that they can receive one main benefit they take from an account creation: updates to events they attend without the organizer having to know their email address. Would that be possible via OAuth?
  • is OAuth a parallel/distinct authentication approach to the current authentication mechanism where the json web token is given directly by the database? Or will it separate just the endpoints so that some of the programmatic authentication route to the backend will be shared?

@goatfryed
Copy link
Contributor Author

goatfryed commented Dec 7, 2020 via email

@dargmuesli
Copy link
Member

Here is a 🔥 example on how this can be implemented: https://youtu.be/c_-b_isI4vg?t=8884

@dargmuesli dargmuesli changed the title feat: Support login via oauth feat: support login via oauth May 8, 2023
@dargmuesli dargmuesli transferred this issue from maevsi/maevsi Jun 20, 2023
@dargmuesli
Copy link
Member

dargmuesli commented Sep 24, 2023

To prepare this year's hacktoberfest, I researched the plan for updating the authentication scheme for maevsi:

As the sum of those changes is complex, any partly progress is highly appreciated! 🙏 Just remember to comment here when you start working on some task so that others are aware of that and can prevent duplicate parallel work.

@goatfryed if you're fine with it, I'd edit your original port and add this plan to it so it's immediately visible for people checking out this issue. Are you?

@goatfryed
Copy link
Contributor Author

Sorry for the quite late reply. Yes i'm totally fine with your editing.
I was plagued by a bit of illness, but I want to help make atleast a bit of progress here.
I'll investigate your proposed steps and comment, once I start actual work on.

Some more thoughts:

What's the user id of users registered via oauth2 providers? It makes sense to use either email or OIDCs preferred username attribute, but in both cases how do we handle an existing user that registered via another provider (signup/another oauth2 provider).
To keep it simple in the beginning, we could extend the user table by a provider discriminator and verify that as well and reject collisions.
Alternatively, we could just use the email and trust our selected providers that they verify the primary email.

In a second step, we should move the providers to an own relationship and send a verifcation email, if a user wants to connect through a new provider.

@goatfryed
Copy link
Contributor Author

Okay, i spent half a day finding a working version of docker window. I'll start working on the postgraphile migration

@dargmuesli
Copy link
Member

Alright, thank you! Any progress shared is totally fine, it's not required to implement the perfect solution right away in the limited Hacktoberfest timeframe 🙏

I think using the email address as identification is a good idea 🙌
Merging of accounts and such should be an advanced feature that's not necessary by now but of course it's a good idea to already consider it in some way 👌

@dargmuesli dargmuesli added novelty Something completely new and removed feature New feature or request labels Nov 21, 2023
@dargmuesli dargmuesli self-assigned this Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
novelty Something completely new
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants