Authorization
Introduction
A library designed to simplify the implementation of authorization functions in projects, providing commonly used authorization functions.
Installation
To use @phpcreation/frontend-auth-authorization-flow-react-nextjs-bundle in your project, follow these steps:
Open a terminal in your project root
Create a Github Personnal Access Token
Create a Github Personal Access TokenLogin to NPM registry
npm login --scope=@phpcreation --auth-type=legacy --registry=https://npm.pkg.github.com- username: your github username in lowercase
- password: The PAT you just created
Install the Package
npm install @phpcreation/frontend-dynamodb-react-nextjs-bundleSetup
Environment Variables
Follow these steps to manage environment variables correctly :
Environment Variables Management.env
## Auth Bundle
### Login App
LOGIN_AUTHORIZE_SCHEME="https://"
### OAUTH API
OAUTH_CALLBACK_ENDPOINT="/api/oauth/callback"
OAUTH_AUTHORIZE_SCHEME="https://"
OAUTH_API_TOKEN_SCHEME="https://"
.env.dev/.staging/.prod
## Auth Bundle
### Login App
LOGIN_BASE_URL="ENVIRONMENT.login.phpr.link"
LOGIN_AUTHORIZE_URL="ENVIRONMENT.login.phpr.link/api/authorize"
### OAUTH API
OAUTH_AUTHORIZE_ENDPOINT="ENVIRONMENT.login.solidservice.link/authorize"
OAUTH_API_BASE_URL="ENVIRONMENT.login.solidservice.link"
OAUTH_API_TOKEN_URL="ENVIRONMENT.login.solidservice.link/token"Usage
Follow these steps to implement authorization and login in your project. https://github.com/PHPCreation/phpreaction-frontend-dashboard-react/issues/11
Common Issues
Common IssuesLast updated on