OAuth2/Phoenix Example Application
July 26, 2016 ยท View on GitHub
This is an example application showing how one can integrate with the OAuth2 library and the Phoenix framework.

To start the application:
- Register a new application on GitHub
- Enter http://lvh.me:4000/auth/github/callback for the Authorization callback URL
- Set the
GITHUB_REDIRECT_URIenvironment variable to the callback URL - Set the
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETenvironment variables - Install Elixir dependencies with
mix deps.get - Install NodeJS dependencies with
npm install - Setup the database with
mix ecto.setup - Start the application with
mix phoenix.server
Now you can visit lvh.me:4000 from your browser and click "Sign in with
GitHub".
After authorizing the application, you should see the welcome message above.