LoginSignup
0
1

More than 3 years have passed since last update.

AmplifyでCognitoユーザプールの認証を行いトークン(ID、アクセス)取得後、トークンの有効期限を取得する

Last updated at Posted at 2019-12-24

概要

AmplifyでCognitoユーザプールの認証を行いトークン(ID、アクセス)取得後、トークンの有効期限を取得する。

実装

下記実行でUNIX秒が返ってくる。
new Date() に渡すときは、1000をかける(ミリ秒にして渡す)こと。

  (await Auth.currentSession()).getIdToken().getExpiration()

参考

0
1
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
1