# How to do Okta sign in with flutter and authenticate with back-end Api (Just like google sign-in)

**URL:** <https://devforum.okta.com/t/how-to-do-okta-sign-in-with-flutter-and-authenticate-with-back-end-api-just-like-google-sign-in/16308>\
**Category:** OAuth/OIDC\
**Created:** [September 23, 2021, 10:53pm UTC](https://devforum.okta.com/t/how-to-do-okta-sign-in-with-flutter-and-authenticate-with-back-end-api-just-like-google-sign-in/16308 "2021-09-23T22:53:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shenouda.Mikhael](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@Shenouda.Mikhael](https://devforum.okta.com/u/Shenouda.Mikhael)\
**Post date:** [September 23, 2021, 10:53pm UTC](https://devforum.okta.com/t/how-to-do-okta-sign-in-with-flutter-and-authenticate-with-back-end-api-just-like-google-sign-in/16308/1 "2021-09-23T22:53:20Z")

</div>

Hi,

I am trying to implement okta in my mobile app the details goes like the following

1 - I am using flutter + google sign-in

2 - I am willing to replace google sign-in with okta

the scenario in google sign-in goes like that :

1- the user click sign-in in the mobile app

2- type in the email and pass and sign in

3- google sign in will forward the user data to the login redirect route which is my back-end API

4 -my back-end api return the JWT to the mobile app for further calls

in Okta what I achieved so far

1- I created a native app authentication, I used the flutter\_okta\_sdk: ^1.0.0-dev.7 ([flutter\_okta\_sdk | Flutter Package](https://pub.dev/packages/flutter_okta_sdk))

2- I can authenticate with okta successfully in the mobile app following the steps ( [GitHub - sonikro/flutter-okta-sdk: Okta's SDK Implementation for Flutter](https://github.com/sonikro/flutter-okta-sdk) )

3- but the redirect url is (non http) on the app like : com.mycompany:/logn

4- so I manually redirected the result of the sign in to my back-end APi

5- and created OIDC - OpenID Connect - Web Application and used it to confirm the access tokens and Ids

```
 ( which works correctly but its not the best scenario ) 

```

kindly note the following:

if I used the “OIDC - OpenID Connect - Web Application” in flutter mobile app, the app caches (I expected is to do so, but I wanted to use an https redirect url )

my problem is how to make the sign in proccess redirect to the back end ??

( the other option is let the user type in the email/password directly into the mobile app then I authenticate from the back-end )

or is there anything I missed in the documentations ??

I appreciate your effort

Shenouda Mikhael

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 7:08pm UTC](https://devforum.okta.com/t/how-to-do-okta-sign-in-with-flutter-and-authenticate-with-back-end-api-just-like-google-sign-in/16308/2 "2024-02-12T19:08:56Z")

</div>

Closed on February 12, 2024, 7:08pm UTC


