Skip to content
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

fix: throw if no account exists #102

Merged
merged 4 commits into from
Nov 1, 2023
Merged

fix: throw if no account exists #102

merged 4 commits into from
Nov 1, 2023

Conversation

esaminu
Copy link
Collaborator

@esaminu esaminu commented Oct 30, 2023

Throw in the following cases:

  1. Login attempt with non existing account on firebase
  2. Account does not exist on chain due to acc creation previously failed
  3. Account can't be looked up due to indexer falling behind

@esaminu esaminu requested a review from hcho112 October 30, 2023 21:25
@vercel
Copy link

vercel bot commented Oct 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fast-auth-signer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2023 9:09pm

const parsedUrl = new URL(failure_url || success_url || window.location.origin + (basePath ? `/${basePath}` : ''));
parsedUrl.searchParams.set('code', error.code);
parsedUrl.searchParams.set('reason', message);
window.location.replace(parsedUrl.href);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see this part of code gets repeated multiple times, is it possible if we pull this into a util function and repeat on other areas?

Copy link
Collaborator

@hcho112 hcho112 left a comment

Choose a reason for hiding this comment

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

Rest looks good. Just comment on refactoring.

@esaminu esaminu merged commit 602b660 into main Nov 1, 2023
3 checks passed
@esaminu esaminu deleted the throw-if-no-account-found branch November 1, 2023 16:55
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