Authentication QR
Authentication workflow through QR codes

Presenting users with a QR makes your authentication workflow more convenient for users on non-mobile devices.

The authentication workflow using QR codes allows users to authenticate on your project without handwriting its self identifier, just by scanning the QR code you’re providing.

  # Generate a QR code to authenticate
  @app.authentication
      .generate_qr
      .as_png(border: 0, size: 400)
      .save('/tmp/qr.png', :interlace => true)
qrdata, err := s.auth.GenerateQRCode(&authentication.QRAuthenticationRequest{
	QRConfig: fact.QRConfig{
		Size:            400,
		BackgroundColor: "#FFFFFF",
		ForegroundColor: "#000000",
	},
})
let buf = sdk.authentication().generateQR()
const fs = require('fs').promises;
await fs.writeFile('/tmp/qr.png', buf);

Once the user scans the QR code with its device and accepts the authentication request, it will send back an authentication response to your app.

Have in mind the user’s device will send you back an authentication response, so setup a subscription to that topic.