OAuth2/Phoenix Example Application
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_URI
environment variable to the callback URL - Set the
GITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
environment 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.