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

Questions about cognito authentication with nuxt2 + nuxt-auth + aws-amplify #1848

Open
youngseo-im opened this issue May 16, 2023 · 2 comments
Labels

Comments

@youngseo-im
Copy link

youngseo-im commented May 16, 2023

I'm using cognito and nuxt-auth in a nuxt2 project

I want to apply a custom UI instead of the login UI provided by AWS, so I implemented login using aws-apmlify package, but the token is not renewed, how should I configure nuxt.config.js?

I didn't configure amplify with the CLI because it only requires authentication during the aws-amplify service.

// current nuxt.config.js
스크린샷 2023-05-16 18 49 51

// current Login Page
스크린샷 2023-05-16 18 51 05

// Request URL and error message
스크린샷 2023-05-16 18 56 07
스크린샷 2023-05-16 18 55 09
스크린샷 2023-05-16 19 00 40

@youngseo-im
Copy link
Author

Sorry, I'll edit the question.

After modifying the settings in nuxt.config.js like this, I don't get the error I posted above.
Instead, it doesn't renew the token when it expires, what should I do?

스크린샷 2023-05-17 10 34 10

@Henrikrb
Copy link

Henrikrb commented May 24, 2023

Hi!

Take a look at this scheme https://auth.nuxtjs.org/schemes/refresh
I believe it's because the local scheme does not implement a refresh logic.
Also by looking at endpoints, it does not have a configuration for the refresh endpoint.

However looking at the endpoints, it seems like oauth2 which would be
https://auth.nuxtjs.org/schemes/oauth2

If you have to implement your own strategy there is documentation for this as well
https://auth.nuxtjs.org/guide/scheme#creating-your-own-scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants