Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkpoon/elm-auth0-urlparser
UrlParser of Auth0 token callback
https://github.com/kkpoon/elm-auth0-urlparser
auth0 elm elm-lang
Last synced: about 1 month ago
JSON representation
UrlParser of Auth0 token callback
- Host: GitHub
- URL: https://github.com/kkpoon/elm-auth0-urlparser
- Owner: kkpoon
- License: bsd-3-clause
- Created: 2017-06-17T05:45:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-26T01:59:12.000Z (over 6 years ago)
- Last Synced: 2024-10-13T20:21:29.669Z (2 months ago)
- Topics: auth0, elm, elm-lang
- Language: Elm
- Homepage: http://package.elm-lang.org/packages/kkpoon/elm-auth0-urlparser/latest
- Size: 6.84 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-auth0-urlparser
Help function to create an UrlParser of Auth0 token callback.
Recommend to use this library with
`[kkpoon/elm-auth0](https://github.com/kkpoon/elm-auth0)`.## Example
In your routing module...
```elm
import UrlParser exposing (..)
import Auth0.UrlParser
exposing
( Auth0CallbackInfo
, Auth0CallbackError
, accessTokenUrlParser
, unauthorizedUrlParser
)type Route
= AccessTokenRoute Auth0CallbackInfo
| UnauthorizedRoute Auth0CallbackError
| SomeOtherRouteroute : Parser (Route -> a) a
route =
oneOf
[ map AccessTokenRoute accessTokenUrlParser
, map UnauthorizedRoute unauthorizedUrlParser
, map SomeOtherRoute (s "others")
]
```