Retrieve a user's QR code for 2FA
Prerequisites
- The user needs to be added as a support user (via the
api/user/add_support
endpoint) - Ideally, the users' agency needs to be set as test.
Part 1: Finding a User's TOTP secret
- Setup kubectl and authenticate with GCloud (@todo add link to docs)
- Port forward Cassandra `kubectl port-forward -n cassandra cassandra-cassandra-0 9042:9042
- Open DataGrip. Can use the free trial for 30 minutes.
- Connect to Phoenix
- Open data sources by going to File > Data sources
- Configure Phoenix Cassandra DB
- Connect and open
user > tables > messages
- Run the following query and replace
%USER_ID%
with the user's ID. You can find the user ID on Intercom.persistence_id='UserEntity|%USER_ID%' and ser_manifest='com.phoenix.user.impl.UserCreated'
7. Find
"totpSecret":"*****"
in the event
column
Part 2: Generating a QR Code
- Open https://stefansundin.github.io/2fa-qr/
- Paste the secret retrieve from part 1 into the secret field
- Type the label into the label field. EG:
reOS
- Check advanced options and change the valid period to 60 seconds
- Take a screenshot of the QR code and send it to sales or whoever may need to forward it. Ideally send it directly to the customer so no one else can authenticate as them.