Giter Site home page Giter Site logo

passwordlessauthenticationprototype's Introduction

PasswordlessAuthenticationPrototype

This repo demonstrates the typical password-less authentication experience. The user is only required to log into the app one time using a "magic" link sent to their email. No username or password is required and once the user is logged in, they don't have to login again. This prototype is ONLY a demonstration and has no real functionality other than showcasing the password-less authentication workflow.

End-to-End Workflow

  1. A user requests an invitation to try the app and an automated email is sent containing instructions on how to download the app.
  2. Once the app is installed the user opens the "magic" link on the device.
  3. Opening the magic link opens the app and logs the user into the "platform".
  4. The user is presented with a personalized greeting displaying their name and email address.

Technical Details

Built using C# and ASP.NET Core 2.2. The REST API documentation is generated using Swashbuckle/Swagger. To generate our "magic" links we used the built-in timed-one-time-password (TOTP) algorithm by setting ASP.NET Core's DataProtectorTokenProvider's TokenLifespan to 15 minutes. It's important to note that this change affects other workflows such as email confirmation, password reset, etc. which may not be desired. In our case, since our "platform" is accessible only by invitation, there is no user signup, email confirmation, password reset, etc.

Once the user is emailed the "magic" link and opened on the device we authenticate the mobile app using standard bearer token authentication. The access token and refresh token are both persisted to secure storage on the device for subsequent use. The access token currently has a lifespan of 1 hour. This allows us to deactivate users in the backend to prevent future access without having to periodically query the database on certain requests to make sure the user is still active.

Mobile Apps (Android and iOS)

Built using C# and Xamarin Forms (100% shared code). To initiate the password-less authentication workflow we leveraged the app links/deep linking functionality on Android and universal links on iOS.

Screenshots

Web

Web Screenshot

API Swagger Documentation

Web API Screenshot

Email Invitation

Email Invitation Screenshot

Mobile

Android Screenshotย iOS Screenshot

passwordlessauthenticationprototype's People

Contributors

halhunt avatar

Watchers

James Cloos avatar  avatar

passwordlessauthenticationprototype's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.