Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivarprudnikov/test-client-for-oauth2
OAuth2 client (server) helps testing OAuth providers
https://github.com/ivarprudnikov/test-client-for-oauth2
oauth2 oauth2-client
Last synced: 14 days ago
JSON representation
OAuth2 client (server) helps testing OAuth providers
- Host: GitHub
- URL: https://github.com/ivarprudnikov/test-client-for-oauth2
- Owner: ivarprudnikov
- Created: 2017-08-09T18:02:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T09:38:04.000Z (almost 4 years ago)
- Last Synced: 2024-04-14T14:49:30.770Z (9 months ago)
- Topics: oauth2, oauth2-client
- Language: JavaScript
- Size: 80.1 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# test-client-for-oauth2
OAuth2 client (server) helps testing OAuth providers## Reason
Need a client application which tests my OAuth2 provider implementation, or any other for that sake.
## Setup
- clone repo
- install dependencies `npm i`
- modify `config.js`
- **port** default `9090`
- **baseUrl** used to build `redirect_uri`
- **client** object is passed as options to [client-oauth2](https://github.com/mulesoft/js-client-oauth2#options-global-and-method-based)
* **clientId** The client id string assigned to you by the provider
* **clientSecret** The client secret string assigned to you by the provider (not required for `token`)
* **accessTokenUri** The url to request the access token (not required for `token`)
* **authorizationUri** The url to redirect users to authenticate with the provider (only required for `token` and `code`)
* **redirectUri** A custom url for the provider to redirect users back to your application (only required for `token` and `code`)
* **scopes** An array of scopes to authenticate against
* **state** Nonce sent back with the redirect when authorization is complete to verify authenticity (should be random for every request)
- **paths.authFlowStart** this path will start authentication sequence (eg: redirect to get authorization code)
- **paths.authFlowCallback** callback path finishes OAuth flow and renders token. Also used to build `redirect_uri`
- start app `node index`
- open `baseUrl` and follow `Get auth token` link to initiate auth flow