Files
remark42/site/src/docs/api/authorization/index.md
T
2021-10-09 13:05:03 -05:00

611 B

title
title
Authorization
  • GET /auth/{provider}/login?from=http://url&site=site_id&session=1 - perform "social", anonymous or email login with one of supported providers and redirect to url. Presence of session (any non-zero value) change the default cookie expiration and makes them session-only
  • GET /auth/logout - logout
type User struct {
    Name     string `json:"name"`
    ID       string `json:"id"`
    Picture  string `json:"picture"`
    Admin    bool   `json:"admin"`
    Blocked  bool   `json:"block"`
    Verified bool   `json:"verified"`
}