logto-io / js

🤓 Logto JS SDKs.
https://docs.logto.io/quick-starts/
MIT License
50 stars 36 forks source link

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

Open funkel1989 opened 1 week ago

funkel1989 commented 1 week ago

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

funkel1989 commented 1 week ago

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.