docs icon indicating copy to clipboard operation
docs copied to clipboard

Can't running Vue example

Open gandaldf opened this issue 3 years ago • 3 comments

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 avatar Jun 09 '23 15:06 gandaldf

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/ ?

aeneasr avatar Jun 09 '23 16:06 aeneasr

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

gandaldf avatar Jun 09 '23 16:06 gandaldf

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

aeneasr avatar Jun 09 '23 16:06 aeneasr