You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the nuxt-oidc-auth module in my Nuxt application and I’m wondering if it’s possible to redirect users back to the originally blocked URL after logging in via a provider (e.g., Keycloak), instead of redirecting them to a predefined page (e.g., redirectUri).
In sidebase/nuxt-auth, there is an option addDefaultCallbackUrl, which I tested, and it worked out of the box as expected. It is described in the documentation as follows:
addDefaultCallbackUrl
Type: boolean | string
Default: true
Whether to add a callbackUrl to sign in requests. Setting this to a string-value will result in that being used as the callbackUrl path. Setting this to true will result in the blocked original target path being chosen (if it can be determined).
Is this behavior possible with nuxt-oidc-auth, or is there a way to achieve this through middleware?
I would prefer to use nuxt-oidc-auth as it works better for my use case and has more features, but I miss this functionality. Is there a way to replicate the behavior of sidebase/nuxt-auth, or can it be implemented via middleware?
Thanks in advance! I really appreciate all the hard work that has gone into this module - it’s been fantastic to work with.
The text was updated successfully, but these errors were encountered:
An additionally useful feature is to add an override parameter for the redirect URI to the login() function to allow setting the page where the user is redirected differently for different pages, for example like this:
A similar option should also be available for logout.
This would give the developer more freedom to redirect users to the most suitable page depending on context.
For example, in the user account management a "Delete account" button could first request a token with higher privileges (that requires re-authentication) from the identity provider, and then redirect to a page that actually deletes the account using an API request that need this token with higher privileges.
Hello,
I am using the
nuxt-oidc-auth
module in my Nuxt application and I’m wondering if it’s possible to redirect users back to the originally blocked URL after logging in via a provider (e.g., Keycloak), instead of redirecting them to a predefined page (e.g.,redirectUri
).In sidebase/nuxt-auth, there is an option
addDefaultCallbackUrl
, which I tested, and it worked out of the box as expected. It is described in the documentation as follows:Is this behavior possible with
nuxt-oidc-auth
, or is there a way to achieve this through middleware?Here are my current Nuxt settings:
I would prefer to use nuxt-oidc-auth as it works better for my use case and has more features, but I miss this functionality. Is there a way to replicate the behavior of sidebase/nuxt-auth, or can it be implemented via middleware?
Thanks in advance! I really appreciate all the hard work that has gone into this module - it’s been fantastic to work with.
The text was updated successfully, but these errors were encountered: