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

Ability to render during initial session refresh API call #919

Open
1 of 5 tasks
PaulCombal opened this issue Sep 23, 2024 · 0 comments
Open
1 of 5 tasks

Ability to render during initial session refresh API call #919

PaulCombal opened this issue Sep 23, 2024 · 0 comments
Labels
enhancement An improvement that needs to be added pending An issue waiting for triage

Comments

@PaulCombal
Copy link

Describe the feature

My project uses the local provider. On every page load, even before app.vue is rendered, a call to my authentication endpoint is made, presumably to get the authentication data.

I wouldn't have an issue with this if I could display a loading screen while the request is being made. I apologize if I missed the way to get around it.

image

This screenshot shows that the trace of the call, and I do not know if I can render anything before it finishes. The call seems to be run before the refreshHandler's init method is called.

How would you implement this?

The topic is open to discussion. Maybe the initial session refresh call can be disabled in the configuration, just like we can for enableOnWindowFocus.
useAuth().refresh() would have to be called manually in the app.

Additional information

  • Would you be willing to help implement this feature?

Provider

  • AuthJS
  • Local
  • Refresh
  • New Provider
@PaulCombal PaulCombal added enhancement An improvement that needs to be added pending An issue waiting for triage labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement that needs to be added pending An issue waiting for triage
Projects
None yet
Development

No branches or pull requests

1 participant