A tiny Node.js microservice to generate a cryptographically-random verifier
and challenge
(for React Native authentication flows).
This can help if you are required to follow the Auth0 Authorization Code Grant Flow with PKCE with Expo/React Native (as Node.js' crypto
module is not available in RN).
GET https://your-url.now.sh/
You will get the data in the following format:
{
"verifier": "MAIYIPi-3BJWxzaV1cXPZGnfMZdgbWuwxThvUdmFHQE",
"challenge": "eWbxKj7OZAr8RDaGSHN_bWvxpDBrS30lGW53DHzuUT8"
}
Keep in mind that this process is a compromise and should usually be handled locally. It's probably secure enough, but keep in mind that this microservice should only be accessed through HTTPS.
git clone git@github.com:fabe/micro-verifier-challenge.git
yarn
yarn dev
The server will be listening at localhost:3000
.
- Fabian Schultz (@fschultz_)