# Newbie Q on Widget - setTokens

**URL:** <https://devforum.okta.com/t/newbie-q-on-widget-settokens/12630>\
**Category:** Questions\
**Created:** [January 26, 2021, 12:43pm UTC](https://devforum.okta.com/t/newbie-q-on-widget-settokens/12630 "2021-01-26T12:43:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markgrayson](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@markgrayson](https://devforum.okta.com/u/markgrayson)\
**Post date:** [January 26, 2021, 12:43pm UTC](https://devforum.okta.com/t/newbie-q-on-widget-settokens/12630/1 "2021-01-26T12:43:41Z")

</div>

Hi there - a newbie question. Just trying to run the widget in a SPA and getting the following error:

TypeError: oktaSignIn.authClient.setTokens is not a function

Any help/pointers much appreciated

---

<div class="post-metadata">

**Author:** ![Fuzzard](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/fuzzard/32/1909_2.png) [@Fuzzard](https://devforum.okta.com/u/Fuzzard)\
**Post date:** [January 26, 2021, 7:18pm UTC](https://devforum.okta.com/t/newbie-q-on-widget-settokens/12630/2 "2021-01-26T19:18:50Z")

</div>

that looks like an invalid call for that function as it should be **authClient.tokenManager.setTokens()**

> **[okta/okta-auth-js - tokenManager.setTokens(tokens)](https://github.com/okta/okta-auth-js#tokenmanagersettokenstokens)**
>
> The official js wrapper around Okta's auth API. Contribute to okta/okta-auth-js development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 26, 2024, 6:15pm UTC](https://devforum.okta.com/t/newbie-q-on-widget-settokens/12630/3 "2024-01-26T18:15:20Z")

</div>

Closed on January 26, 2024, 6:15pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
