# How to retrieve device\_secret in okta-auth-js

**URL:** <https://devforum.okta.com/t/how-to-retrieve-device-secret-in-okta-auth-js/19747>\
**Category:** Questions\
**Created:** [March 9, 2022, 9:45pm UTC](https://devforum.okta.com/t/how-to-retrieve-device-secret-in-okta-auth-js/19747 "2022-03-09T21:45:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guptar](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@guptar](https://devforum.okta.com/u/guptar)\
**Post date:** [March 9, 2022, 9:45pm UTC](https://devforum.okta.com/t/how-to-retrieve-device-secret-in-okta-auth-js/19747/1 "2022-03-09T21:45:17Z")

</div>

I am using device\_sso scope in my application to get device\_secret and want to retrieve the device\_secret in my angular app which uses okta-auth-js.

I only see the following to get refresh\_token, id\_token and access\_token but no method to get device\_secret.

oktaAuth.getRefreshToken()  
oktaAuth.getIdToken()  
oktaAuth.getAccessToken()

Question 1: Is there a a method that can give me the device\_secret ?  
Question 2: Is there a way to retrieve the full response of the the POST /oauth2/default/token. Which contains all the requested token details ?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 9:46pm UTC](https://devforum.okta.com/t/how-to-retrieve-device-secret-in-okta-auth-js/19747/2 "2024-02-08T21:46:50Z")

</div>

Closed on February 8, 2024, 9:46pm UTC


