No token type received when using implicit grant flow

Hey guys, I’m having a small annoying problem with my code right now. I’m building an iOS app, and I’m using twitch to login with it. For some reason, when i receive the callback, the library i’m using says that there is no token type that is sent. Because of this, it will not use the token.

To be clear, I am getting the url with the access token in it, but I’m not getting authorized via OAuth.

What would be a good approach to solving this problem?

You get this type of URL in response, right?

https://[your registered redirect URI]/#access_token=[an access token]&scope=[authorized scopes]

What do you mean by “…but I’m not getting authorized via OAuth”? Do you mean you’re getting access denied when you make a subsequent request using the access token?

I am getting that type of URL in my response.

I’m using a Swift iOS library called p2_OAuth2. When authorization is done, it’s supposed to return a success reply, along with all the parameters that should be passed from Twitch. However, instead it’s throwing an error related to no token type being received.

I hope that explains it better, I’m having trouble understanding the problem really itself as well.

Figured it out! I didn’t realize that I had to program my flow so that it would require a token type. I ended up using a flow of code grant that didn’t require a token type and everything’s working. Thanks for the help!

Awesome! Glad you figured it out. :slight_smile:

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