gothinkster / spring-boot-realworld-example-app

Example Spring codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.
MIT License
1.32k stars 682 forks source link

Login mutation doesn't work #35

Closed adil-waqar closed 3 years ago

adil-waqar commented 3 years ago

If I use the login mutation under UserMutation, it works fine. But protected mutations like createArticle still don't work, throwing Authentication exception. The code itself also doesn't send out a JWT token on login. What could be the issue?

aisensiy commented 3 years ago

You should add Authentication Header for those requests:

image

adil-waqar commented 3 years ago

You should add Authentication Header for those requests:

image

And where do I get the Authorization token(xxx) from? Login mutation doesn't return it

aisensiy commented 3 years ago

image

I think the schema shows the message :-)

adil-waqar commented 3 years ago

image

I think the schema shows the message :-)

My bad, totally missed that. Thanks!