# Is it possible to implement getting Authorization Code using PKCE with custom login form in iOS/Android?

**URL:** <https://community.auth0.com/t/is-it-possible-to-implement-getting-authorization-code-using-pkce-with-custom-login-form-in-ios-android/9402>\
**Category:** Get Help\
**Tags:** pkce\
**Created:** [February 5, 2018, 8:06am UTC](https://community.auth0.com/t/is-it-possible-to-implement-getting-authorization-code-using-pkce-with-custom-login-form-in-ios-android/9402 "2018-02-05T08:06:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugenebrusov](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@eugenebrusov](https://community.auth0.com/u/eugenebrusov)\
**Post date:** [February 5, 2018, 8:06am UTC](https://community.auth0.com/t/is-it-possible-to-implement-getting-authorization-code-using-pkce-with-custom-login-form-in-ios-android/9402/1 "2018-02-05T08:06:25Z")

</div>

I’ve already implemented getting Authorization Code using PKCE in iOS app, but it requires app to redirect the user to browser and login via Auth0 login form. Just wonder if it’s possible to get Authorization Code using PKCE via some custom login form?

---

<div class="post-metadata">

**Author:** ![ricardo.batista](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ricardo.batista/32/7711_2.png) [@ricardo.batista](https://community.auth0.com/u/ricardo.batista)\
**Post date:** [February 8, 2018, 11:20pm UTC](https://community.auth0.com/t/is-it-possible-to-implement-getting-authorization-code-using-pkce-with-custom-login-form-in-ios-android/9402/2 "2018-02-08T23:20:59Z")

</div>

Currently, Authorization Code using PKCE needs a redirect to the browser. You can, however, configure the login form displayed in the browser by using the [Hosted Login Page] ([Auth0 Universal Login](https://auth0.com/docs/hosted-pages/login)).

By using this browser based authentication we are following the recommendations of the Internet Engineering Task Force (IETF), who has recently release a [Best Current Practices (BCP) when using OAuth 2.0 with native mobile applications] ([https://www.rfc-editor.org/rfc/rfc8252.txt](https://www.rfc-editor.org/rfc/rfc8252.txt)) where it states that `OAuth 2.0 authorization requests from native apps should only be made through external user-agents, primarily the user's browser.`.

You can read more about this recommendation here:

> **[OAuth 2.0 Best Practices for Native Apps](https://auth0.com/blog/oauth-2-best-practices-for-native-apps/)**
>
> The IETF has released Best Current Practice (BCP) for OAuth 2.0 in native apps. Learn about it now.

[https://www.rfc-editor.org/rfc/rfc8252.txt](https://www.rfc-editor.org/rfc/rfc8252.txt)

> **[Mobile Device Login Flow Best Practices](https://auth0.com/docs/get-started/authentication-and-authorization-flow/mobile-device-login-flow-best-practices)**
>
> Describes the pros and cons between a browser-based vs. native experience when implementing Auth0 on a mobile device

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 10:02am UTC](https://community.auth0.com/t/is-it-possible-to-implement-getting-authorization-code-using-pkce-with-custom-login-form-in-ios-android/9402/3 "2019-07-25T10:02:18Z")

</div>


