01Send them to authorize
A full page navigation, not a request you make. Generate a state and a PKCE pair per attempt and keep both against the session. S256 is the only accepted method, and it is required of confidential clients too.
verifier=$(openssl rand -base64 48 | tr '+/' '-_' | tr -d '=')
challenge=$(printf %s "$verifier" | openssl dgst -sha256 -binary \
| openssl base64 | tr '+/' '-_' | tr -d '=')
# Send the browser here. curl cannot complete this step for you.
https://onefold.eitozx.com/o/authorize/
?response_type=code&client_id=$CLIENT_ID
&redirect_uri=https://yourapp.example/callback
&scope=openid%20identity%20profile&state=$state
&code_challenge=$challenge&code_challenge_method=S256