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

User Creation #23

Closed
3 tasks done
SverreNystad opened this issue Jan 4, 2024 · 3 comments
Closed
3 tasks done

User Creation #23

SverreNystad opened this issue Jan 4, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@SverreNystad
Copy link
Member

SverreNystad commented Jan 4, 2024

Acceptance Criteria:

  • A User should be able to sign in
  • A User should be able to sign up
  • Document Database Schema
@SverreNystad
Copy link
Member Author

SverreNystad commented Jan 4, 2024

Both signin and signup now works in the django backend. The user is saved to postgres (I think) and the password is hashed in the backend

sandviklee added a commit that referenced this issue Jan 4, 2024
Co-authored-by: Sverre Nystad <sverrenystad@gmail.com>
SverreNystad added a commit that referenced this issue Jan 4, 2024
@SverreNystad
Copy link
Member Author

We should pass a token when logging in to account and maybe on creation of account.

This repo has this support: https://github.com/jpadilla/pyjwt/

>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
>>> jwt.decode(encoded, "secret", algorithms=["HS256"])
{'some': 'payload'}

And this for frontend: https://github.com/panva/jose

@SverreNystad
Copy link
Member Author

This is now implemented and live on main. However I have done no CSS so it needs a shine up.
image
image

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

No branches or pull requests

2 participants