https://github.com/myuon/pyxis
Pyxis
https://github.com/myuon/pyxis
Last synced: 8 days ago
JSON representation
Pyxis
- Host: GitHub
- URL: https://github.com/myuon/pyxis
- Owner: myuon
- Created: 2018-10-21T04:15:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-23T07:47:27.000Z (over 6 years ago)
- Last Synced: 2025-02-21T12:03:03.723Z (4 months ago)
- Language: OCaml
- Homepage:
- Size: 3.73 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pyxis
## Auth flow
SignUp flow:
1. Call signUp with Google idp token
1. Verify token in server-side
1. Create User account in DB and set idpSignIn flow:
1. Call signIn with Google idp token
1. Verify token and verify userId in DB
1. Create jwt## Google login
Place `google.json` file (which includes `.web.client_id` information) in `/token`
## JWT
JWT (Json Web Token) is used for authentication and authorization.
### Key generation
```sh
$ cd token
$ ssh-keygen -t ecdsa -b 256 -f jwtES256.key
$ openssl ec -in jwtES256.key -pubout -outform PEM -out jwtES256.key.pub
```This will generate `jwtES256.key` and `jwtES256.key.pub`.
### Schema
Payload:
```json
{
user: {
userId: "userId",
}
}
```## Build
- Generates keys (google auth token/jwt keys) explained above
- Run `sls dynamodb install` before starting serverless offline server
- Set `aws credentials` for awscli