This is a demo Phoenix app that shows how to use Web Push notification to authenticate users.
The flow involves 2 steps:
- Registration: on a computer, a user opens a QR code on his/her phone. The user accepts push notifications to be sent on his/her phone
- Authentication: on a computer, the user enters his/her login. A web push notification is sent to his/her phone with a link. The link opens a web page asking for authentication confirmation. Upon acceptance, the user is authenticated on the computer
This demo is deployed on https://mob-push-auth.onrender.com/. This is a free tiers and it can take a few minutes to start.
This is not ready for production use. Security model is not documented. That's just about sharing ideas :)
As of February, 2023:
- doesn't work on iOS (support for Web Push Notifications on iOS planned for 2023)
- works on Android with Chrome
- doesn't work with Android and Firefox or Mi Browser