Skip to content

New auth flow#430

Open
chinmay29fynd wants to merge 10 commits intomasterfrom
new-auth-flow
Open

New auth flow#430
chinmay29fynd wants to merge 10 commits intomasterfrom
new-auth-flow

Conversation

@chinmay29fynd
Copy link
Copy Markdown
Collaborator

New auth flow

Comment thread src/lib/Auth.ts Outdated
});
return response.data || {};
} catch (error) {
return { auth_mode: 'legacy' };
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.

On each error it will be switched to legacy, don't we need to handle based on response ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@vivek-gofynd will do this instead?

client-config will fall back to legacy only when the endpoint returns 404.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

using this approach

Comment thread src/lib/Auth.ts Outdated
const tokenRes = await ApiClient.post(`${authBase}/oauth/token`, {
headers: {
'Content-Type': 'application/json',
'x-fp-cli': `${packageJSON.version}`,
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.

@chinmay29fynd Check if this can be handled at axios interceptor level

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

added in interceptor

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.

3 participants