Open Rajveer9575 opened 3 years ago
I have the same Issue??
Please let me know if you have a Solution?
Thank you for you advances :)
@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
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.
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
com.bezkoder.springjwt.controllers.AuthController.lambda$1(AuthController.java:99)