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

Can't running Vue example #1430

Open
3 of 6 tasks
gandaldf opened this issue Jun 9, 2023 · 3 comments
Open
3 of 6 tasks

Can't running Vue example #1430

gandaldf opened this issue Jun 9, 2023 · 3 comments
Labels
bug Something is not working.

Comments

@gandaldf
Copy link

gandaldf commented Jun 9, 2023

Preflight checklist

Describe the bug

I follwed this tutorial step by step:
https://www.ory.sh/docs/getting-started/integrate-auth/vue

but I can't get my Vue app running correctly:

Uncaught runtime errors:

ERROR
Request failed with status code 401
    at createError (webpack-internal:///./node_modules/@ory/client/node_modules/axios/lib/core/createError.js:16:15)
    at settle (webpack-internal:///./node_modules/@ory/client/node_modules/axios/lib/core/settle.js:17:12)
    at XMLHttpRequest.onloadend (webpack-internal:///./node_modules/@ory/client/node_modules/axios/lib/adapters/xhr.js:49:7)

Is this a ory/client error?

Reproducing the bug

Follow the tutorial:
https://www.ory.sh/docs/getting-started/integrate-auth/vue

Relevant log output

createError.js:16 Uncaught (in promise) Error: Request failed with status code 401
    at createError (createError.js:16:1)
    at settle (settle.js:17:1)
    at XMLHttpRequest.onloadend (xhr.js:54:1)

Relevant configuration

No response

Version

"@ory/client": "^1.1.33"

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

@gandaldf gandaldf added the bug Something is not working. label Jun 9, 2023
@aeneasr
Copy link
Member

aeneasr commented Jun 9, 2023

The error is most likely coming from ory.toSession().then(({ data }).

Have you tried running the example directly from https://github.com/ory/docs/tree/master/code-examples/protect-page-login/ ?

@gandaldf
Copy link
Author

gandaldf commented Jun 9, 2023

Thank you, with that code it seems to work!
What was the problem?

@aeneasr
Copy link
Member

aeneasr commented Jun 9, 2023

I don't know! The code in the docs page is the same as in the repository

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

No branches or pull requests

2 participants