An example OAuth2 client that shows how to integrate a web app with Quran Foundation's OAuth2 server.
-
Clone the repository:
git clone https://github.com/quran/quran-oauth2-client-example.git cd quran-oauth2-client-example -
Install dependencies:
npm install
-
Create a
.envfile with the required environment variables:PORT=3000 BASE_PATH=http://localhost:3000 CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret TOKEN_HOST=LOCAL_HYDRA (e.g. http://localhost:5444) SCOPES=openid profile email SESSION_SECRET=your_random_session_secret NODE_ENV=development
-
Start the server:
npm start
-
Visit
http://localhost:3000in your browser.
- Node.js 18.x or higher
For a detailed walkthrough, check out our tutorial.
ISC