I think I have read every possible document in Auth0 SDKs related to this and it seems it’s not possible.
All SDK quickstart points to using webAuth() which uses SSO and gives me access-token without refresh token anywhere.
I want to use access+refresh token, without having client_secret anywhere in code. Hence authorization code flow with PKCE.
But that does not seem possible with native SDK at all. There are no methods I see to facilitate this and online help points to implementing your own SDK with URLSessionDataTask.
Is this really the only way to do it?
I find it strange that the least risky way of integrating 3rd party identity is not supported by the SDK at all.
Native apps, must use PKCE since they cannot securely store secrets. Therefore the .webAuth() method inherently does this and handles the code_challenge and code_verifier for PKCE to work.
If you need both an access token and a refresh token, you will need to specify the scope=offline_access in the webAuth() call.