Login with BankID
Already created users (in the user database) can sign in using BankID.
Prerequisites
Pointsharp IdP
The identity provider must be able to find an existing user by searching a configured attribute.
End users need a BankID and the app
To use the BankID identification and signature features, end users must install the BankID app on a mobile device or a PC. They also need to order a BankID from their bank.
QR code generation
Animated QR codes are used with BankID when the user is running the service (webpage or app) on one device, for example, a computer, but use BankID on another device, for example, their mobile.
The flow is:
-
Your service generates a QR code.
-
Your service presents the QR code to the user.
-
The user scans the QR code using their BankID app. If successful, the BankID app will proceed with the order.
For generation, use the pattern 'bankid.qrStartToken.time.qrAuthCode' as link in the QR code, where:
-
bankidis a fixed prefix. -
qrStartTokenis from the auth or sign response. -
timeis the number of seconds since the order was created. -
qrAuthCodeis computed as HMACSHA256(qrStartSecret, time), wheretimeis the number of seconds since the response from auth or sign was returned, andqrStartSecretis from the auth or sign response.
| The qrStartSecret shouldn’t be sent to your frontend. It’s a secret to be shared by BankID service and your backend only. |
| The BankID request order at the backend server is 30s (user must scan in the 30s window). |
For complete instructions and sample codes, see https://developers.bankid.com/how-to-guides/qr-code
When BankID is stored on the same device as the service provider
When the BankID client is stored on the same device used to visit your app or webpage, the app is started by using autostart.
-
Go to https://developers.bankid.com/how-to-guides/autostart for instructions on how to start the BankID app when it is stored on the same device used to visit your app or webpage.
-
The user should be sent back to the app or webpage once they’ve completed their action in the BankID client. Read more on how to create a return URL: https://developers.bankid.com/how-to-guides/return-url