# Auth0 is sending a RS256 signed token instead of HS256 signed token

**URL:** <https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216>\
**Category:** Get Help\
**Tags:** token, java\
**Created:** [September 17, 2017, 7:57am UTC](https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216 "2017-09-17T07:57:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lahiruchandima](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@lahiruchandima](https://community.auth0.com/u/lahiruchandima)\
**Post date:** [September 17, 2017, 7:57am UTC](https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216/1 "2017-09-17T07:57:24Z")

</div>

I am trying to obtain an auth token with [Auth0 java client](https://github.com/auth0/auth0-java).

In Auth0, I have a non interactive client. **JsonWebToken Signature Algorithm** is set to `HS256` in the client. I use following code to obtain the token.

```
AuthAPI auth = new AuthAPI("my.domain", "my_client_id", "my_client_secret");
AuthRequest request = auth.login("username", "password").setAudience("my_audience");
TokenHolder holder = request.execute();

```

But, the token I receive is signed with `RS256` instead of `HS256`.

What could be the problem here?

---

<div class="post-metadata">

**Author:** ![awsnonprod](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@awsnonprod](https://community.auth0.com/u/awsnonprod)\
**Post date:** [October 14, 2017, 2:36am UTC](https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216/2 "2017-10-14T02:36:03Z")

</div>

lahiruchandima, I’m running into the same issue: I get a token back, but instead of being an HS256 token, it’s a RS256 one, as indentified by [JWT.io](http://JWT.io). Any hope?

---

<div class="post-metadata">

**Author:** ![lahiruchandima](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@lahiruchandima](https://community.auth0.com/u/lahiruchandima)\
**Post date:** [October 14, 2017, 8:04am UTC](https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216/3 "2017-10-14T08:04:39Z")

</div>

I got an answer for this in Stack Overflow. [Auth0 is sending a RS256 signed token instead of HS256 signed token - Stack Overflow](https://stackoverflow.com/a/46269995/1015678)

---

<div class="post-metadata">

**Author:** ![lahiruchandima](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@lahiruchandima](https://community.auth0.com/u/lahiruchandima)\
**Post date:** [October 14, 2017, 8:04am UTC](https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216/4 "2017-10-14T08:04:39Z")

</div>

I got an answer for this in Stack Overflow. [Auth0 is sending a RS256 signed token instead of HS256 signed token - Stack Overflow](https://stackoverflow.com/a/46269995/1015678)

---

<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:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/auth0-is-sending-a-rs256-signed-token-instead-of-hs256-signed-token/8216/5 "2018-03-02T05:56:32Z")

</div>


