mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-01-11 11:48:29 +01:00
Document Example in README
This commit is contained in:
parent
514a59e00b
commit
714467b4d1
20
README.md
20
README.md
@ -117,6 +117,26 @@ stack build --pedantic --test
|
||||
|
||||
Please also run HLint and Weeder before submitting PRs.
|
||||
|
||||
## Example
|
||||
|
||||
This project includes an executable that runs a server with (almost) all
|
||||
supported providers present.
|
||||
|
||||
To use:
|
||||
|
||||
1. `cp .env.example .env` and edit in secrets for providers you wish to test
|
||||
|
||||
Be sure to include `http://localhost:3000/auth/page/{plugin}/callback` as a
|
||||
valid Redirect URI when configuring the OAuth application.
|
||||
|
||||
2. Build with the example: `stack build ... --flag yesod-auth-oauth2:example`
|
||||
3. Run the example `stack exec yesod-auth-oauth2-example`
|
||||
4. Visit the example: `$BROWSER http://localhost:3000`
|
||||
5. Click the log-in link for the provider you configured
|
||||
|
||||
If successful, you will be presented with a page that shows the credential and
|
||||
User response value.
|
||||
|
||||
---
|
||||
|
||||
[CHANGELOG](./CHANGELOG.md) | [LICENSE](./LICENSE)
|
||||
|
||||
@ -6,19 +6,6 @@
|
||||
{-# LANGUAGE TypeApplications #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
||||
-- |
|
||||
--
|
||||
-- This single-file Yesod app uses all plugins defined within this site, as a
|
||||
-- means of manual verification that they work. When adding a new plugin, add
|
||||
-- usage of it here and verify locally that it works.
|
||||
--
|
||||
-- To do so, see @.env.example@, then:
|
||||
--
|
||||
-- > stack build --flag yesod-auth-oauth2:example
|
||||
-- > stack exec yesod-auth-oauth2-example
|
||||
-- >
|
||||
-- > $BROWSER http://localhost:3000
|
||||
--
|
||||
module Main where
|
||||
|
||||
import Data.Aeson
|
||||
|
||||
Loading…
Reference in New Issue
Block a user