In today's world of app development, passwordless authentication is becoming increasingly popular due to its convenience and enhanced security features. Xano, a no-code platform, has made it easy to implement this authentication method by offering a ready-to-use extension called "Magic Link with SendGrid." In this guide, we'll walk you through the process of setting up passwordless authentication using the Magic Link with SendGrid extension in Xano and integrating it with Flutter Flow, a popular no-code tool for building Flutter apps.
Before we begin, make sure you have the following:
The first step is to install the Magic Link with SendGrid extension in your Xano project. Here's how you can do it:
Since we'll be demonstrating the passwordless authentication flow using the web version of your Flutter Flow app, we need to enable web deployment. Here's how you can do it:
After publishing your Flutter Flow app to the web, you'll need to set the redirect URI in your Xano project. This URI will be used to redirect the user back to your app after clicking the magic link in their email. Here's how you can set it up:
/my-info).To make the Magic Link with SendGrid extension work seamlessly with Flutter Flow, we'll need to make a couple of modifications:
auth/magic/link endpoint.generate_magic_link function and modify the separator variable to include a ?token= query parameter. This will allow Flutter Flow to parse the magic token from the URL.auth/magic/login endpoint, modify the response to nest the auth token in a JSON object with a key called auth_token. This will make it easier to parse the response in Flutter Flow.With the backend setup complete, it's time to configure the API calls in Flutter Flow:
request_login_link (for sending the user's email to request the magic link)magic_login (for exchanging the magic token with an auth token)auth_me (for fetching the authenticated user's information)Now, let's create the user interface for the passwordless authentication flow:
request_login_link API and displays a snackbar message upon successful submission.magic_login API to exchange the magic token (parsed from the URL) for an auth token.auth_me API to fetch and display the authenticated user's information.With everything set up, it's time to test the passwordless authentication flow:
Congratulations! You've successfully implemented a passwordless authentication flow using Xano's Magic Link with SendGrid extension and integrated it with your Flutter Flow app.
Passwordless authentication offers a seamless and secure login experience for your app users. By leveraging Xano's Magic Link with SendGrid extension and integrating it with Flutter Flow, you can quickly build and deploy applications with this authentication method without writing a single line of code.
Remember, this guide is just the beginning. You can further enhance the user experience by customizing the email templates, adding error handling, and implementing additional features like sign-up and forgot password flows.
Happy coding!
Join 100,000+ people already building with Xano.
Start today and scale to millions.
Start building for free