Skip to content

fix(auth): update to last API version#35

Open
tuturd wants to merge 4 commits intodevfrom
fix/auth
Open

fix(auth): update to last API version#35
tuturd wants to merge 4 commits intodevfrom
fix/auth

Conversation

@tuturd
Copy link
Copy Markdown
Member

@tuturd tuturd commented May 3, 2026

No description provided.

@tuturd tuturd requested a review from TeddyRoncin May 3, 2026 09:25
Copy link
Copy Markdown
Member

@TeddyRoncin TeddyRoncin left a comment

Choose a reason for hiding this comment

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

Sorry j'ai commencé en anglais au début à écrire, du coup t'as 2-3 comments en anglais (déformation professionnelle 🤣 )

Comment thread src/app/(wrapper)/login/page.tsx Outdated
.on('success', (body) => {
if (body.status === 'no_api_key') {
if (body.status === 'no_account') {
if (!body.token) return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In case of "no_account", there will always be a token

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Qu'est-ce qui serait le plus propre selon toi pour corriger ça ?
Car si je ne met pas la condition, le type de body.token est string | null. Je met un as string ? je sais pas si c'est très propre...
Même chose pour les autres comments

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

body.token!, ça assert que token est pas null | undefined

Copy link
Copy Markdown
Member

@TeddyRoncin TeddyRoncin May 4, 2026

Choose a reason for hiding this comment

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

Ou sinon goat et tu fais un type qui dit ce que je t'ai dit dans le comment 😂

return;
}
if (body.status === 'no_api_key') {
if (!body.token) return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same, always a token

window.location.assign(body.redirectUrl);
return;
}
if (!body.token) return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same, if there is no redirectUrl, there is a token (it's one or the other)

Comment thread src/module/session.ts
@TeddyRoncin TeddyRoncin mentioned this pull request May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants