LoginSignup
5
4

More than 3 years have passed since last update.

cognitoに登録したユーザでpostmanでログインする簡単な方法

Posted at

Gakuです。
firebase authenticationからcognitoにIDaaS乗り換え計画実施中です。
postmanでcognitoに登録したユーザのtokenを取得する方法で少しハマったので、自分用にやり方記載しておきます。

cognitoの設定

全般設定>アプリクライアントからアプリクライアントを作成し、以下のように設定
image.png

アプリの統合>アプリクライアントの設定で以下のように設定
image.png

アプリの統合>ドメイン名の設定で以下のように設定
image.png
(※ドメイン名は何でもOK

postmanの設定

認証タブでTypeをOauth2.0に設定Get New AccessTokenを押すと設定windowが表示されるので、以下のように設定
image.png
(※Auth URLは先程設定したドメイン+/loginであることに注意

Request Tokenをクリックするとログインwindowが表示される。
image.png

cognitoに登録したユーザでログインすれば無事AccessTokenをゲットできる!

おわりに

firebase authenticationの時よりpostman上でaccess tokenをゲットするのは楽。
久しぶりにaws触ってるけど楽しい(´・ω・`)

5
4
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
5
4