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

After logging in, it jumps to the callback page. When entering other pages, it still jumps to the third party. #6

Open
Felix-d-eng opened this issue Apr 18, 2024 · 4 comments

Comments

@Felix-d-eng
Copy link

Felix-d-eng commented Apr 18, 2024

After logging in, it jumps to the callback page. When entering other pages, it still jumps to the third party.

@Felix-d-eng Felix-d-eng changed the title Do not jump to third-party platforms After logging in, it jumps to the callback page. When entering other pages, it still jumps to the third party. Apr 18, 2024
@zhazhazhu
Copy link
Owner

I'm not sure what the problem is with you, please give me a reproduction address. Alternatively, you can try using vue3-oidc

@Felix-d-eng
Copy link
Author

Felix-d-eng commented Apr 19, 2024

Sorry, I didn't express myself clearly. Your code below catches the exception and causes the page to not report an error or jump. I did not set the responseType correctly. Setting responseType to "code" will jump to login, but setting it to "id_token" tells me "Only the Authorization Code flow (with PKCE) is supported", and I checked the store and found that the id_token was not brought back because I set Is it caused by code and not id_token?

return oidcUserManager.signinRedirect(options).catch((err) => {
        this["setOidcError"](errorPayload("authenticateOidc", err));
  });

Is it because the id_token cannot be obtained in the store because my okta setting is not correct? This is the return parameter of the address
"oidc-callback?code=-iPRcs06Ke5yAgvOMOerM2OjWpBEfprUFJvvMV98-8U&state=8d1ab5b2e78b4e14ab4ed0e3afc8c218"

@Felix-d-eng
Copy link
Author

Thank you for your framework. I have successfully obtained the id_token. It is my problem. The value of oidcStore must be obtained in onMount. But I still want to give you a suggestion. Maybe you can throw some exceptions. I can know this. Which parameters are incorrect and need to be corrected?

@zhazhazhu
Copy link
Owner

Thank you for your framework. I have successfully obtained the id_token. It is my problem. The value of oidcStore must be obtained in onMount. But I still want to give you a suggestion. Maybe you can throw some exceptions. I can know this. Which parameters are incorrect and need to be corrected?

This framework has too many dependencies, so I don't plan to maintain it anymore, although it can meet most scenarios. I still recommend that you migrate to vue3-oidc, which runs on Vue3 without any additional dependencies or better APIs

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

No branches or pull requests

2 participants