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

See if login time can be reduced #41

Open
hgwood opened this issue Oct 22, 2018 · 4 comments
Open

See if login time can be reduced #41

hgwood opened this issue Oct 22, 2018 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@hgwood
Copy link
Member

hgwood commented Oct 22, 2018

Login time can be quite long and this is especially annoying for this app because:

  • time in the app is very short, so login time is significant
  • most user will come no more than once a month which means most logins will be cold (no token renewal possible)

As far as I could see most of the time is waiting for the HTTP request to Auth0, so I'm not sure how we can improve, but I'd be happy for someone to have another look.

As an alternative, I guess we could take the optimistic UI approach and show the vote screen immediately after the user comes back from Auth0, not waiting for the HTTP response, and then only if login is rejected the app can show an alert and reload, or something like that.

@hgwood hgwood added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 22, 2018
@hgwood
Copy link
Member Author

hgwood commented Oct 16, 2020

For the optimistic UI part, see #162.

Regarding the Auth0 call, currently the access token is opaque and there is no choice but to call Auth0 to validate it. However, we could change the authentication configuration to request an access token in the JWT format. That would allow exchangeToken to validate the token without calling Auth0.

@hgwood
Copy link
Member Author

hgwood commented Oct 28, 2020

@jlandure Gave me another idea. The Auth0 domain is hosted in Europe, while the Cloud function is hosted in the US. By co-locating the two we should have less latency.

@jlandure
Copy link
Member

Hey @hgwood 👋

Indeed, the latency between Europe/America still remains around ~150ms. ⚡️
I think there is nothing to change the default zone/region. You have to recreate the function. 😊

@hgwood
Copy link
Member Author

hgwood commented Nov 5, 2020

Closed by mistake.

@hgwood hgwood reopened this Nov 5, 2020
hgwood added a commit that referenced this issue Nov 5, 2020
See #41 (comment). Also updates firebase-functions.
hgwood added a commit that referenced this issue Nov 5, 2020
See #41 (comment). Also updates firebase-functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants