Not 100% sure what you concern is about, but loginOkta based on the repo, which you attached, will do redirect. code_verifier/challenge is taken care of by okta-auth-js automatically, behind the scene, so you don’t need explicitly do anything, except setting a config parameter for okta-auth-js to use PKCE flow.