LoginSignup
0
0

More than 1 year has passed since last update.

CognitoのユーザIDを取得(Amplify, Android)

Posted at

Amplifyで認証完了後に実行

    Amplify.Auth.currentUser.userId

実装例

    // session確認
    Amplify.Auth.fetchAuthSession(
        {
            // Sessionがある場合
            var userId = Amplify.Auth.currentUser.userId
            binding.userId = userId
        },
        {
            error -> Log.e("AmplifyQuickstart", "Failed to fetch auth session", error)
        }
    )
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0