Menu

1 / 2

[Lime #1] OAuth Login

DEV Community·MinBapE·6 months ago
#zSdzMs4q
#oauth#dotnet#software#token#enter
Reading 0:00
15s threshold

Today's Work

I decided on and implemented the login flow for Lime v1.

At first, I considered supporting both OAuth login and email/password sign-up. However, building email sign-up properly would bring in many additional features, such as password hashing, email verification, and password recovery.

At this stage, I wanted to move quickly and focus on the core product. So for v1, I decided to support only Google and Discord OAuth .

In Lime v1, users do not sign up with an email and password.

They log in with a Google or Discord account, and the backend automatically creates Lime's User .

After a successful login, the backend issues a JWT Access Token and a Refresh Token for our service.

What I Built

Google OAuth login

Discord OAuth login

OAuth callback handling

Automatic Lime User creation on first login

Linking OAuth accounts to existing users

JWT Access Token issuance

Refresh Token issuance and storage

Refresh Token rotation

Logout

Handling OAuth failure and cancellation cases

Overall…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.