module

MiniStore::OAuth

GitHub üzerinden OAuth 2.0 yetkilendirme kodu akışı.

  1. /auth/github -> kullanıcı GitHub'a yönlendirilir
  2. GitHub geri döner -> gelen kod erişim belirteciyle takas edilir
  3. erişim belirteciyle kullanıcı bilgisi okunur, kendi oturumumuz açılır

Constants

AUTHORIZE_URL = "https://github.com/login/oauth/authorize"
STATE_TTL = 10.minutes
TOKEN_URL = "https://github.com/login/oauth/access_token"
USER_URL = "https://api.github.com/user"

Instance methods

authorize_url(state : String) : String
Source
client_id
Source
configured?
Source
consume_state(state : String | Nil) : Bool
Source
exchange_code(code : String) : String | Nil
Source
fetch_user(access_token : String) : User | Nil
Source
issue_state

Siteler arası istek sahteciliğine karşı tek kullanımlık durum değeri.

Source
redirect_uri
Source