# Authorization Code Flow with PKCE using Auth0 Android SDK - Clarification whether the sdk does the pkce implicit?

**URL:** <https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253>\
**Category:** Get Help\
**Tags:** sdk, android, pkce, authentication\
**Created:** [March 31, 2020, 3:32pm UTC](https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253 "2020-03-31T15:32:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![clma](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/clma/32/13280_2.png) [@clma](https://community.auth0.com/u/clma)\
**Post date:** [March 31, 2020, 3:32pm UTC](https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253/1 "2020-03-31T15:32:01Z")

</div>

**Questions to clarify whether the SDK is already doing the work**

In our android app I successfully implemented Auth0 for Android using the [Quickstart Tutorial](https://auth0.com/docs/quickstart/native/android).

Am I correct that the Authorization Code Flow with PKCE is implicitly done by using the Auth0 SDK?

When I debug in the SDK an OAuthManager object is created after the `WebAuthProvider.start()`-call and the authentication is started with `.startAuthentication()`. Then the method `.addPKCEParameters()` is executed:

```
createPKCE(redirectUri);
String codeChallenge = pkce.getCodeChallenge();
parameters.put(KEY_CODE_CHALLENGE, codeChallenge);
parameters.put(KEY_CODE_CHALLENGE_METHOD, METHOD_SHA_256);

```

So can I assume that the Authorization Code Flow with PKCE is implicitly executed?

The article [Authorization Code Flow with Proof Key for Code Exchange (PKCE)](https://auth0.com/docs/flows/concepts/auth-code-pkce) refers to the article [Add Login Using the Authorization Code Flow with PKCE](https://auth0.com/docs/flows/guides/auth-code-pkce/add-login-auth-code-pkce#example-post-to-token-url), which describes step by step how to implement the code flow with PKCE.

Do I understand correctly that the CODE\_VERIFIER and CODE\_CHALLENGE does not have to be explicitly generated and sent to the /authorize endpoint, but is implicitly done by the SDK?

Thanks for your feedback.

Regards,  
Claudio

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 2, 2020, 10:22pm UTC](https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253/3 "2020-04-02T22:22:57Z")

</div>

Hi @clma,

Welcome to the Community!

According to the doc you linked:

> [Auth0 Mobile SDKs](https://auth0.com/docs/libraries#auth0-sdks) and [Auth0 Single-Page App SDK](https://auth0.com/docs/libraries/auth0-spa-js): The easiest way to implement the flow, which will do most of the heavy-lifting for you. Our [Mobile Quickstarts](https://auth0.com/docs/quickstart/native) and [Single-Page App Quickstarts](https://auth0.com/docs/quickstart/spa) will walk you through the process.
> 
> Authentication API: If you prefer to roll your own, keep reading to learn how to call our API directly.

In short, yes you are correct! The sdk and quickstart are going to handle the code exchange and all you have to do is fill in the correct client and tenant info.

I would suggest following the quickstarts and SDks if you want to get things up and running quickly or follow the login doc you linked if you want to work directly with the auth server.

Let me know if you have any questions!  
Dan

---

<div class="post-metadata">

**Author:** ![clma](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/clma/32/13280_2.png) [@clma](https://community.auth0.com/u/clma)\
**Post date:** [April 3, 2020, 6:32am UTC](https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253/4 "2020-04-03T06:32:07Z")

</div>

Hi @dan.woda

Thanks for clarifying. Things are already up and running, I just wanted to make sure that this was already being done by the SDK - happy now. 🙂

clma

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 3, 2020, 9:36pm UTC](https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253/5 "2020-04-03T21:36:39Z")

</div>

You should be all set! Thanks for following up.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 18, 2020, 9:36pm UTC](https://community.auth0.com/t/authorization-code-flow-with-pkce-using-auth0-android-sdk-clarification-whether-the-sdk-does-the-pkce-implicit/40253/6 "2020-04-18T21:36:40Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
