realworld-starter-kit icon indicating copy to clipboard operation
realworld-starter-kit copied to clipboard

Auth Routes

Open JackyChiu opened this issue 7 years ago • 6 comments

  • [x] Login
  • [ ] Login And Remeber Token
  • [x] Register
  • [ ] Current User
  • [ ] Update User

JackyChiu avatar Apr 26 '17 00:04 JackyChiu

Curious if these were are suppose to be swapped around. https://github.com/JackyChiu/realworld-starter-kit/blob/master/main.go#L24-L25 Accessing users require the user to be signed in but logging in shouldn't require the token?

qwo avatar Apr 28 '17 20:04 qwo

@stanzheng nice catch, that should be swapped

adelowo avatar Apr 28 '17 20:04 adelowo

Hey, @stanzheng and @adelowo! Yep, I definitely got that swapped up, thanks for catching that! I actually need to structure the handlers better as well since I have my Registration (which doesn't require auth) in my UsersRouter

If you guys have any suggestions for any parts of the design, feel free to drop me a line anytime!

JackyChiu avatar Apr 28 '17 20:04 JackyChiu

Yeah! I'm waiting for the auth to be a bit wired up and maybe ill be able to jump in on something. thanks for spear heading this!

qwo avatar Apr 28 '17 21:04 qwo

Hi I notice that the authorization header should be Token not Bearer according to the Api Specs

Authentication Header: Authorization: Token jwt.token.here

guillaumemaka avatar May 07 '17 17:05 guillaumemaka

@guillaumemaka Yep I'm fixing that in the auth package, the spec was recently changed

JackyChiu avatar May 07 '17 18:05 JackyChiu