DEV Community

Cover image for How to setup supabase authentication in a flutter app with deep linking|| πŸ”΄ Part β€” 2
Next Dev
Next Dev

Posted on

How to setup supabase authentication in a flutter app with deep linking|| πŸ”΄ Part β€” 2

Welcome friends to this blog post where you will learn how to set up the supabase authentication in the flutter app. Moreover, the deep link is also available.

The people who understand Hindi πŸ‘‡

If you didn’t setup the supabase in your app, then follow this previous blog where you learn how to setup supabase πŸ‘‡
How to use supabase database in flutter || πŸ”΄ Part β€” 1

You can follow this GitHub repository
GitHub - nextdev1111/flutter-supabase-authentication

So, let us come to the app.


Now we will make the screens in screens folder

First we need to auth manager, auth state, auth required state in utils folder.


This is auth state πŸ‘‡ which you can use to load the data of the user from supabase. If you face any problem, feel free to ask me at discord. Link at the last.

There are 3screens in **screens **folder.
  1. Home screen (user should be authenticated)

  2. Login Screen

  3. Splash Screen

This is the splash screen πŸ‘‡ which will initilize when the user opens the app.


Now, you need to add snack bars for notifying user.

make this constants.dart in contstants folder.


Now, let’s go to android manifest for adding deep link.

Add this **full **code in the file. Don’t just copy the data line, but copy full intent filter.


In IOS, add this **full **code.

Now, the last step is left

go to your supabase project.

Now, first close your app and then re run it. Your deep link will work only then.

Feel free to ask your questions here πŸ‘‡
Join the Next Dev Discord Server!

Top comments (0)