Skip to content

gnatal/Oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a stardart Oauth2 implementation (Just the auth server) It's a working in progress

This is an auth code default implementation, it uses PKCE to secure that the tokens are 
valid. This implementation does identity validation using clientSecret, if you use an SPA
this won't work because SPA's doesn't get clientSecrets (SPA's are insecure by default), but
you still can use this work to authenticate SPA's because uses PKCE


Features

  1. Create user
  2. Authenticate user
  3. Logout User
  4. Create client
  5. Grant Consent
  6. Remove Consent
  7. Issue tokens
  8. Validate tokens
  9. Issue Refresh tokens
  10. Validate Refresh tokens
  11. Create scopes

you must create an .env file to and set the following properties
PORT=your_port
TOKEN_DURATION_SECONDS=your_seconds
DAY_IN_SECONDS=86400

To do

  1. Create user
  2. Authenticate user
  3. Logout User
  4. Create client
  5. Grant Consent
  6. Remove Consent
  7. Issue tokens
  8. Validate tokens
  9. Issue Refresh tokens
  10. Validate Refresh tokens
  11. Create scopes
  12. [] SPA demonstration app
  13. Back-end demonstration app
  14. [] Third-Party demonstration app

Demonstration apps

  1. Oauth server click here! as your authenticator and authorization
  2. SPA usage click here! (as your main app)
  3. Back-end click here! Using as a data server
  4. Back-end click here! usage (as a third party app)

License

MIT License

Copyright (c) 2021 Natal

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

An Oauth2 implementation using typerom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors