Created
May 15, 2019 16:42
-
-
Save laiso/4d56a96aa6e2d185933738bb5d12a759 to your computer and use it in GitHub Desktop.
サーバーレスレスアーキテクチャでFirebase Authでログインさせる時はuidそのまま送ると実装によっては置き換え攻撃ができてしまう! https://firebase.google.com/docs/auth/admin/verify-id-tokens?hl=ja #CodePiece
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
signInSuccessWithAuthResult: (authResult, redirectUrl) => { | |
authResult.user | |
.getIdToken(false) | |
.then(idToken => { | |
// idToken をサーバーへ送ってdecodeしてuserを取り出す!!!! | |
}); | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment