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

bug: Not able to set redirect URL for NuxtJS Module. #763

Open
1 of 4 tasks
funkel1989 opened this issue Jul 5, 2024 · 2 comments
Open
1 of 4 tasks

bug: Not able to set redirect URL for NuxtJS Module. #763

funkel1989 opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@funkel1989
Copy link

Describe the bug

The @logto/nuxt module does not allow a custom redirect URL. I need this because my nuxtjs site is hosted with its server on aws lambda backed by api gateway and its static content on an s3 bucket. This is brought together with both origins in aws cloudfront. Bottom line is, the code currently gets redirect URL via the HREF and thats happening on the server which means the callback URL is to the URL of the API gateway which doesn't have a cert on it and doesn't actually host the entire frontend. I need to be able to tell it that its URL is that of the actual website URL to the callback passes through cloudfront and gets correctly routed.

Expected behavior

I'd like to be able to pass in a redirectURL that is expected by my site.

How to reproduce?

Look at your exported type and Code, this is not allowed the way it is currently written

Context

  • Logto Cloud
  • Self-hosted
    • Container (Docker image)
    • Raw Node.js
@funkel1989 funkel1989 added the bug Something isn't working label Jul 5, 2024
@funkel1989
Copy link
Author

FYI I'm more than happy to submit a PR to add redirectUri as a parameter that can override what is currently in the settings but I need some context on why you opted to go the way you did because it looks like most/all of the different js packages work the same way.

@wangsijie
Copy link
Contributor

I believe the Next.js SDK has a configuration option called baseUrl that might address your issue. If Nuxt.js SDK has a similar option, it could potentially solve your problem. I've reviewed your pull request, and it looks promising. Perhaps we could simplify the naming by changing baseUrlOverride to just baseUrl, similar to the Next.js implementation.

https://github.com/logto-io/js/blob/master/packages/next/src/index.ts#L74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants