Open ipxat opened 3 years ago
To receive username and email you should add "email" and "profile" to the list of scopes, as shown here: https://github.com/okta/samples-js-vue/blob/master/okta-hosted-login/src/config.js#L8
The values will be available as properties of the "claims" object on the ID token: https://github.com/okta/samples-js-vue/blob/master/okta-hosted-login/src/components/Home.vue#L35
You can also call getUser
to obtain the user's profile from the Okta backend: https://github.com/okta/samples-js-vue/blob/master/okta-hosted-login/src/components/Home.vue#L83
i am trying to call getUserInfo method authClient.token.getUserInfo(this.getToken()) .then(function (user) { console.log('user', user); });
i am getting following error AuthSdkError: getUserInfo requires an access token object
@ipxat Can you try authClient.getUserInfo
I am unable to get User Information like name, email, profile details from auth-js, i think that code is in Typescript, do you have any working example in vuejs/javascript with user profile