Skip to content

Instantly share code, notes, and snippets.

View kkocel's full-sized avatar

Chris Kocel kkocel

View GitHub Profile
@kkocel
kkocel / oktaverify2totp.md
Created September 17, 2024 11:50 — forked from kamilhism/oktaverify2totp.md
Get TOTP secret key for Okta Verify
  1. Get the content of the QR for Okta Verify app setup. It looks like this: oktaverify://email@domain.com/?t=XXXXX&f=YYYYY&s=https://DOMAIN.okta.com&issuer=DOMAIN.okta.com&isIdxEnabled=true
  2. Replace XXXXX, YYYYY and DOMAIN to your values in curl below:
curl --request POST \
  --url https://DOMAIN.okta.com/idp/authenticators \
  --header 'Accept: application/json; charset=UTF-8' \
  --header 'Accept-Encoding: gzip, deflate' \
  --header 'Authorization: OTDT XXXXX' \
  --header 'Content-Type: application/json; charset=UTF-8' \
import java.math.BigInteger;
import java.util.*;
public class BaseX {
public static final String DICTIONARY = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_+";
public static void main(String[] args) {
UUID uuid = UUID.randomUUID();