# Hello I am unable to make work the quickstart for nodejs api

**URL:** <https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, node-auth0\
**Created:** [July 11, 2023, 7:23pm UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043 "2023-07-11T19:23:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![integration1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@integration1](https://community.auth0.com/u/integration1)\
**Post date:** [July 11, 2023, 7:23pm UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043/1 "2023-07-11T19:23:41Z")

</div>

I have followed the setup for the nodejs api . I have installed express-oauth2-jwt-bearer has the instruction show and I am have to get a token from auth0 to test . However when I try to send the token to my applciation I get the following error : InvalidTokenError: KeyObject or CryptoKey instances for asymmetric algorithms must not be of type “secret”

I search for infor and see that token signing alhorithm in my dashboar is RS256 and my local app is HS256 . I set both to RS256 nad now I get the error form my application : AssertionError [ERR\_ASSERTION]: You must supply one of HS256, HS384, HS512 for ‘tokenSigningAlg’ to validate symmetrically signed tokens  
at jwtVerifier .

Any idea how to solve this ?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 11, 2023, 9:20pm UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043/3 "2023-07-11T21:20:48Z")

</div>

Hello there @integration1 welcome to the community!

> [@integration1](#):
>
> I have followed the setup for the nodejs api .

Do you mind sharing the specific documentation you’re following?

> [@integration1](#):
>
> I search for infor and see that token signing alhorithm in my dashboar is RS256 and my local app is HS256 . I set both to RS256 nad now I get the error form my application : AssertionError [ERR\_ASSERTION]: You must supply one of HS256, HS384, HS512 for ‘tokenSigningAlg’ to validate symmetrically signed tokens  
> at jwtVerifier .

It sounds like the token you’re attempting to verify is still signed with HS256 - Can you confirm the API which you’re using for the `audience` param is also set to use RS256? If you navigate to the API configured in your dashboard Settings → Token Settings.

Keep us posted!

---

<div class="post-metadata">

**Author:** ![integration1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@integration1](https://community.auth0.com/u/integration1)\
**Post date:** [July 12, 2023, 7:28am UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043/4 "2023-07-12T07:28:57Z")

</div>

Hello .Thanks for answering . I have checked the configuration and the signing algorithm of my API is RS256. However I am no able to change it for something else.

---

<div class="post-metadata">

**Author:** ![integration1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@integration1](https://community.auth0.com/u/integration1)\
**Post date:** [July 12, 2023, 8:10am UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043/5 "2023-07-12T08:10:02Z")

</div>

I am using the API example in tfor NODEjs using express-oauth2-jwt-bearer.  
The API uses RS256.  
My backend in node uses HS256.  
express-oauth2-jwt-bearer does not allow me to use RS256.  
The api in AUTH0 does not allow me to change RS256 for another type of signing.  
Does this make sense ? I am missing somthing ?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 13, 2023, 12:04am UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043/6 "2023-07-13T00:04:14Z")

</div>

> [@integration1](#):
>
> My backend in node uses HS256.

Thanks for following up! How are you [initializing](https://github.com/auth0/node-oauth2-jwt-bearer/tree/main/packages/express-oauth2-jwt-bearer#library-initialization) the library? Are you explicitly initializing it to use `HS256`? If you initialize the library similar to what I’ve linked above, it should use `RS256` by default I believe.

If you want to share your code (redacting any sensitive information) I’d be happy to take a look 👀

Let us know!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 27, 2023, 12:05am UTC](https://community.auth0.com/t/hello-i-am-unable-to-make-work-the-quickstart-for-nodejs-api/111043/7 "2023-07-27T00:05:08Z")

</div>

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