Run the generator in console depending on your ORM:
Granite:
mochi g omniauth user granite
or
Jennifer:
mochi g omniauth user jennifer
Migrate
Open up mochi.cr in initializers
mochi.cr
Configure you auth providers app id and secret key
Add:
<a href="/omniauth/github">Sign in with Github</a> to a view.
<a href="/omniauth/github">Sign in with Github</a>
<a href="/omniauth/user/github">Register with Github</a>
Note: Replace github in the href for any providers you configured.
github
Uncomment the commented line in pipes/authenticate.cr
Last updated 6 years ago