Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role is not found #12

Open
Rajveer9575 opened this issue Jul 16, 2021 · 6 comments
Open

Role is not found #12

Rajveer9575 opened this issue Jul 16, 2021 · 6 comments

Comments

@Rajveer9575
Copy link

com.bezkoder.springjwt.controllers.AuthController.lambda$1(AuthController.java:99)

@arifdemircan
Copy link

I have the same Issue??

@arifdemircan
Copy link

Please let me know if you have a Solution?

@arifdemircan
Copy link

Thank you for you advances :)

@ramazansakin
Copy link

@Rajveer9575 @arifdemircan you can check my updated repo, I solved some problems including "Role not found" and also I dockerized the all app and refactored.

https://github.com/ramazansakin/spring-boot-spring-security-jwt-authentication

@v1shaL-b
Copy link

I am having an issue. When registering all users are getting assigned ROLE_USER no matter what I use.
I am using Postman to test API.

@ramazansakin
Copy link

Hi @v1shaL-b ,
You can try to sign up with body like :
{
"username" : "rmzn",
"email" : "rmzn@mail.com",
"password" : "1234567",
"roles" : [
"admin"
]
}

After succesfully registration then sign in ll be returned like:
{
"token": "eyJhbGciOiJIUzUxMiJxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "Bearer",
"id": 1,
"username": "rmzn",
"email": "rmzn@mail.com",
"roles": [
"ROLE_ADMIN"
]
}

It's an admin user, you can check it on TestController.
If you have a problem on this repo, you can check mine :
https://github.com/ramazansakin/spring-boot-spring-security-jwt-authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants