Skip to content

Instantly share code, notes, and snippets.

@y-yu
Created January 17, 2024 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y-yu/737b478383ef4ec442d0ea8784411c71 to your computer and use it in GitHub Desktop.
Save y-yu/737b478383ef4ec442d0ea8784411c71 to your computer and use it in GitHub Desktop.
メールOAuth
sequenceDiagram autonumber
    actor ユーザー
    ユーザー ->> サービス: メール送って!
    サービス -->> ユーザー: OAuth的なマジックリンクを送信
    ユーザー ->> メールプロバイダー: リンクにアクセス
    メールプロバイダー -->> ユーザー:「○○(サービス)がメールを送ろうとしています」
    alt 許可
      メールプロバイダー -->> サービス: リダイレクトで`code_verifier`的なものを送信
      サービス ->> メールプロバイダー: `access_token`でホワイトリスト登録
      サービス -->> ユーザー: メール送信します
    else ダメ
      メールプロバイダー -->> サービス: エラー
      サービス --> ユーザー: エラー
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment