sergiodxa / remix-auth-oauth2

A OAuth2Strategy for Remix Auth
https://sergiodxa.github.io/remix-auth-oauth2/
MIT License
160 stars 63 forks source link

Consider account linking #26

Closed YoruNoHikage closed 5 months ago

YoruNoHikage commented 2 years ago

Hello, great work!

I was looking how an account linking strategy could be implemented and looking at a few passport examples, I saw it was possible to access the request (and knowing if a user is already signed in or not). Would you consider having this implemented?

I think it may also need something like #14 if the "already logged in then ignore" behavior is to be kept.

Sources:

harshPPatel commented 2 years ago

Agreed. A potential implementation can be: At https://github.com/sergiodxa/remix-auth-oauth2/blob/main/src/index.ts#L138, we can add an option: linkAccount.

If user sets this option to true, it simply bypasses the https://github.com/sergiodxa/remix-auth-oauth2/blob/main/src/index.ts#L149 line.

CC: @sergiodxa

maurerbot commented 1 year ago

plug. I use this lib in https://github.com/proofzero/rollupid which supports account linking with a twist...Rollup turns the user into the "issuer".

sergiodxa commented 5 months ago

In #89 now you can call the authenticate method and it will do the process again, allowing linking accounts.