How to set up a callback route in a Vue.js Okta app

吃可爱长大的小学妹 提交于 2020-03-25 16:00:29

问题


I am building a Vue.js application with Okta authentication, loosely based on the following: https://developer.okta.com/blog/2018/02/15/build-crud-app-vuejs-node and https://developer.okta.com/docs/concepts/okta-hosted-flows/. I am trying to gain a better understanding of how to use a callback route when adding Okta to the Vue router. According to these docs, after authenticating the user in the Okta sign up page, the app is briefly redirected to an unseen component called Auth.handleCallback, which handles the redirect to the final routing destination (ex. Home.vue), while also persisting the IDToken in the browser. I understand that this token contains information about the end-user that can be repurposed in other components throughout the app.

What I don't fully understand is Auth.handleCallback's role in regards to rerouting back to the app's final destination, as well as "persisting" the token. Does this mean that Auth.handleCallback is responsible for both adding the token to the browser AND persisting the token? When these docs say "persisting the IDToken", does this mean that it is enabling the token to remain in the browser for later access to the app?

Thanks for the clarification!

来源:https://stackoverflow.com/questions/60582551/how-to-set-up-a-callback-route-in-a-vue-js-okta-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!