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

Can we globally set required: true for getSession on enableRefreshPeriodically and enableRefreshOnWindowFocus #700

Open
2 of 5 tasks
iamdagy opened this issue Mar 5, 2024 · 1 comment
Labels
enhancement An improvement that needs to be added provider-local An issue with the local provider

Comments

@iamdagy
Copy link

iamdagy commented Mar 5, 2024

Describe the feature

in local provider I have in nuxt.config.ts:

        session: {
          enableRefreshOnWindowFocus: true,
          enableRefreshPeriodically: 3600000
        },

it would be nice if it were possible to add :

        session: {
          required:true,
          callback: '/login' ,
          enableRefreshOnWindowFocus: true,
          enableRefreshPeriodically: 3600000
        },

so when it gets a session response without session /error.. it will redirect immediatly to the callback url

How would you implement this?

im not sure.. but i think adding and option for visibilityHandler or for enableRefreshOnWindowFocus and enableRefreshPeriodically.

Additional information

  • Would you be willing to help implement this feature?

Provider

  • AuthJS
  • Local
  • Refresh
  • New Provider
@iamdagy iamdagy added enhancement An improvement that needs to be added pending labels Mar 5, 2024
@phoenix-ru
Copy link
Collaborator

@iamdagy Do you mean an option to automatically redirect to /login page when session invalidates?

@zoey-kaiser zoey-kaiser added provider-local An issue with the local provider and removed pending labels Mar 30, 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 provider-local An issue with the local provider
Projects
None yet
Development

No branches or pull requests

3 participants