Skip to content

220 allow users to sign in to different account - #221

Open
betigirma wants to merge 7 commits into
release-02from
220-allow-users-to-sign-in-to-different-account
Open

betigirma wants to merge 7 commits into
release-02from
220-allow-users-to-sign-in-to-different-account

Conversation

@betigirma

Copy link
Copy Markdown
Collaborator

Screenshot 2025-04-14 061212

I add account selection UI for multi-account users during login

  • Decode token after Google login and check for multiple accounts
  • Show UI to let user choose account if more than one exists
  • Set selected account info in auth cookies
  • Ensure types are respected using User_Info and separate login token state
  • Auto-select account if only one is present

@betigirma betigirma added the enhancement New feature or request label Apr 14, 2025
@betigirma
betigirma requested a review from misudesu April 14, 2025 09:23
@betigirma betigirma self-assigned this Apr 14, 2025
@betigirma betigirma linked an issue Apr 14, 2025 that may be closed by this pull request

setAuthCookie(user);
// Fix: Store user properly in localStorage
if (decoded.accounts.length === 1) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is client component pass the decoded data in to setAuthCookies.

const handleAccountSelect = (account: Account) => {
if (!userInfo || !loginToken) return;

const user: User_Info = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this too , use in server side

@betigirma
betigirma requested a review from misudesu May 15, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

allow users to sign in to different account

2 participants