Skip to content

Instantly share code, notes, and snippets.

@hyuki
Last active June 11, 2022 02:43
Show Gist options
  • Save hyuki/a31b935ad068fefd71591d48cec8550b to your computer and use it in GitHub Desktop.
Save hyuki/a31b935ad068fefd71591d48cec8550b to your computer and use it in GitHub Desktop.
NetlifyでIdentityを用いたRole-based access controlの基本手順例

NetlifyでIdentityを用いたRole-based access controlの基本手順例

基本的にNetlifyの公式ドキュメント通りにすればできます。このページでは大きな流れだけを書いています。

Enable Identity

Invitation Mail

Identity Widget

Role-based access control

  • Role-based access control with JWT | Netlify Docsを読みます。
  • _redirectsの例があるので自分のサイトに置いてデプロイします。
  • さっきInvitation Mailに答えたユーザのRoleをadminに設定してアクセスすると_redirectsの指示通りにアクセス制御されていることがわかります。
  • Roleを変更してから一度ログインし直した方が確実です。

GoTrue

@hyuki
Copy link
Author

hyuki commented Mar 11, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment