Closed notwo closed 9 months ago
Auth0のuser updateするためには、headerに"Authorization": 'Bearer ...'の形式でAPIアクセストークンを埋め込む必要がある
getAccessTokenSilently()
だとBearerのtokenが間違っていて400エラーになる
Auth0 Bad HTTP authentication header format using curlに従い、Management APIの設定をする
おそらくSPAでは "grant_type":"client_credentials" は無理
Update a userではリクエストパラメータにbodyを入れているが、実際には入れては駄目。 エラーメッセージを無視して直接nicknameとemailを送ってみたところうまく行った 返却値で現在userの設定値が返される 更新直後にAuth0側のログインが外れるため、リロードすると再ログインが必須になる(更新直後に他のデータを見たり更新したりすることは可能)
本番環境(render.com)にVITE_AUTH0_API_ACCESS_TOKENの設定が必要
user_update API
Update a user
token設定
Calling an API
以下を.envとrender.comのEnvironmentに設定する