The example using Pragmatic Authentication Library with Cowboy HTTP server.
The project contains examples of authentication via:
To execute the examples on the your local machine you need to:
- Register an Google application at Developers Console.
- Register an Facebook application at App Dashboard.
- Specify the
client_idand theclient_secretin therel/sys.configfor each provider.
-
Build and start the application:
$ make && ./_rel/pal_example/bin/pal_example console -
Open the URI in your browser:
- Google:
https://localhost:8081/examples/oauth2/google - Facebook:
https://localhost:8081/examples/oauth2/facebook
- Google:
See pal project for more information.
The source code is provided under the terms of the MIT license.