Skip to content

Commit

Permalink
feat: make ios nfc messages configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Aug 23, 2024
1 parent 11bda72 commit 9e53ea6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/AusweisAuthFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
type AusweisSdkEnterPinMessage,
type AusweisSdkMessage,
type Subscription,
type AusweisSdkRunAuthCommand,
addMessageListener,
initializeSdk,
sendCommand,
Expand Down Expand Up @@ -108,6 +109,8 @@ export interface AusweisAuthFlowOptions {
* will enable logging of commands and messages sent/received
*/
debug?: boolean

iosNfcModalMessages?: AusweisSdkRunAuthCommand['messages']
}

export interface AusweisAuthFlowStartOptions {
Expand Down Expand Up @@ -338,10 +341,11 @@ export class AusweisAuthFlow {
developerMode: true,
// TODO:
messages: {
sessionStarted: "Please place your ID card on the top of the device's back side.",
sessionFailed: 'Scanning process failed.',
sessionSucceeded: 'Scanning process has been finished successfully.',
sessionInProgress: 'Scanning process is in progress.',
sessionStarted: 'Place your device on top of your eID card to scan it',
sessionFailed: 'Scan failed',
sessionSucceeded: 'Scan successful',
sessionInProgress: 'Scanning in progress',
...this.options.iosNfcModalMessages,
},
tcTokenURL: startOptions.tcTokenUrl,
})
Expand Down

0 comments on commit 9e53ea6

Please sign in to comment.