Skip to content

wellsonjain/trellis

 
 

Repository files navigation

trellis

oauth login

以 devise 為架構,加上 omniauth 提供 GitHub 及 Google 帳號登入
oauth 授權的使用者,資料庫不記錄 password

GitHub

Register new applicatin

application register

config

/config/application.yml

GITHUB_KEY: "your Client ID here"
GITHUB_SECRET: "your Client Secret here"

Google

Register new applicatin

application register

新增 app 憑證 google-oauth-app

新增 API 取得使用者資訊 google-oauth-api

config

/config/application.yml

GOOGLE_CLIENT_ID: "your Client ID here"
GOOGLE_CLIENT_SECRET: "your Client Secret here"

Facebook

Register new applicatin

application register

啟用 app 需要申請 Review,為了方便測試我在正式版 app 底下開了 test version
記得在 settings -> advanced 中設定 redirect URIs,FB 會確認 oauth request 是否來自允許的域名

facebook-oauth

config

/config/application.yml

FACEBOOK_KEY: "your Client ID here"
FACEBOOK_SECRET: "your Client Secret here"

About

Grow your own cucumbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 96.3%
  • CSS 2.0%
  • JavaScript 1.3%
  • CoffeeScript 0.4%