要点
- Auth0 は、API endpoint へのアクセスを保護する手段として API の authentication と Authorization を提供します (API Authentication and Authorization を参照)
- SPA のユーザーを認可するために、Auth0 は Implicit Grant をサポートしています (Implicit Grant を参照)
- SPA と API の両方を Auth0 Dashboard で設定する必要があります (Auth0 Configuration を参照)
- Authorization Extension を使用してユーザー permissions を適用できます (Configure the Authorization Extension を参照)
- API は、API の呼び出し時に有効な access token が HTTP Authorization header で渡されるようにすることで保護されます (Implement the API を参照)
- auth0.js library を使用して SPA のユーザーを認可し、API の呼び出しに使用できる有効な access token を取得できます (Authorize the User を参照)
- SPA は、API の呼び出し時に HTTP Authorization header で access token を渡すことができます (Call the API を参照)
- SPA は、ユーザーに付与された scopes に基づいて、UI 要素を条件付きで表示できます (Display UI Elements Conditionally Based on Scope を参照)