-
Notifications
You must be signed in to change notification settings - Fork 3
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 User Logins #766
Comments
@otobot1 Do you have the Discord user IDs? If not, I don't think there is a way to match the old username+discriminator with their new username. (Discord does still show the last username before the Discord username change, but if the user made a username change in between their last submission and the Discord username change, I don't think we identify them.) |
For the update, I guess we'll need to just update the |
I don't have the Discord IDs unfortunately. What I have is a list of traditional Discord tags, like If this winds up being a big pain, we can leave it for a v0.2.1 update. |
Yep |
How does the site work right now if those users aren't in the database? Ratings need a user (not null) according the prisma schema. |
I was setting up Discord sign in and got a Prisma error - the model User doesn't have email & emailVerified fields. Should I add those, or do you not want to store that data? |
The users are currently in the database in the User table, but once v0.2.0 goes live new people will be able to create users. So, we would need to store the list of "legacy users" in a new table or a text file or something to support any automatic linking of new and legacy users. |
I'd rather not store it, as we don't need it for our purposes. It's been nearly a year since I looked at the Auth stuff, but I did create a custom Prisma Adapter and Discord Provider that should take care of that error. I'm pretty sure I got it all working. If you're writing server-side code, import the session using the getServerAuthSession wrapper function. If you're writing client-side code, call useSession and the |
So I had a bit more of a thought about how to handle unlinked legacy users, and I also noticed that the
Please let me know if you have any questions/comments on this! |
Is your feature request related to a problem? Please describe.
Users need to be able to login with Discord authentication to enable features such as #532. We also need a way for users who submitted ratings to the original mods list to claim their existing user and link it to their Discord ID.
Describe the solution you'd like
i. Ideally this would be an automated process that is triggered when they first try to login to the new website, but this may not be feasible so a 100% manual solution is good enough for now.
ii. Our only identifying information for these users is their discord username and discriminator from when they submitted their last rating - nearly all users will have had their discriminators change to
0
since then as part of Discord's username changes.iii. If an automated solution can't be devised, instruct these users (via an information tooltip/popover somewhere on the login page and also on the FAQ page) to create a new account and then message @otobot1 on Discord with their old information. Create a basic admin page where @otobot1 (and any other admins) can manually link the old and new users.
iv. Either way, the linking will probably require a custom provider but probably won't need a custom adapter. See this file for an example of a custom provider.
My Account
button in the site footer to say "Login" when not logged in and "My Account" when logged in. This button and theSettings
button should move to the top-right of the page, but this can be left as a low-priority follow-up issue.Describe alternatives you've considered
N/A. This is a required feature.
Additional context
Co-supersedes #532 along with #767.
Our cookie usage will need to be explained in our Privacy Policy #534.
The text was updated successfully, but these errors were encountered: