Coder Social home page Coder Social logo

Token always unauthorized about yii2-jwt HOT 9 CLOSED

bizley avatar bizley commented on June 15, 2024
Token always unauthorized

from yii2-jwt.

Comments (9)

rhanifrizal avatar rhanifrizal commented on June 15, 2024 1

I sent it via bearer token

Screenshot_9

from yii2-jwt.

rhanifrizal avatar rhanifrizal commented on June 15, 2024 1

hey, nothings wrong with the package. its because of the user model inside common/models/User.php. The model is used for web and the table is different. so i need to create a new model for it to work.

from yii2-jwt.

bizley avatar bizley commented on June 15, 2024

It's hard to say, you must debug it. First check the token you generated and paste it at https://jwt.io/ to see if everything is ok with it. Then check whatever causes the problem in https://github.com/bizley/yii2-jwt/blob/master/src/JwtHttpBearerAuth.php

from yii2-jwt.

rhanifrizal avatar rhanifrizal commented on June 15, 2024

Invalid signature, do you have any idea why is this happening?

Screenshot_8

from yii2-jwt.

bizley avatar bizley commented on June 15, 2024

This part is ok, if you want to check the signature as well you need to paste the secret there.

from yii2-jwt.

rhanifrizal avatar rhanifrizal commented on June 15, 2024

Do you have any idea where should i look at? Does my codes right? been looking every where but still to no avail

from yii2-jwt.

bizley avatar bizley commented on June 15, 2024

I would run my token through parse and validate.

from yii2-jwt.

bizley avatar bizley commented on June 15, 2024

One more thing, because I don't see it anywhere in your screens - are you sure the token is sent properly in the headers?

from yii2-jwt.

bizley avatar bizley commented on June 15, 2024

So how's it going with the parse and validate? Any luck in the debugging?

from yii2-jwt.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.