Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

OmniAuth LinuxFr.org

This is the official OmniAuth strategy for authenticating to LinuxFr.org. To use it, you'll need to sign up for an OAuth2 Application ID and Secret on the LinuxFr.org Applications Page.

Basic Usage

#!/usr/bin/env ruby# encoding: utf-8require'sinatra'require'omniauth'require'omniauth-linuxfr'useRack::Session::CookieuseOmniAuth::Builderdoprovider:linuxfr,ENV['LINUXFR_KEY'],# The app identifierENV['LINUXFR_SECRET']# The app secretendget'/'do<<-HTML<ahref="/auth/linuxfr">Se connecter avec LinuxFr.org</a> HTMLendget'/auth/failure'do<<-HTML<h2>Erreur</h2><pre>#{params['message']}</pre> HTMLendget'/auth/linuxfr/callback'doauth=request.env['omniauth.auth']<<-HTML<ul><li>login: #{auth.info.login}</li><li>email: #{auth.info.email}</li><li>date: #{auth.info.created_at}</li></ul> HTMLend

Copyright

The code is licensed as MIT. See the MIT-LICENSE file for the full license.

♡2011 by Bruno Michel. Copying is an act of love. Please copy and share.

About

This is the official OmniAuth strategy for authenticating to LinuxFr.org

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages