Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ dependencies {

implementation "androidx.browser:browser:1.2.0"

implementation("com.authsignal:authsignal-android:3.1.1")
implementation("com.authsignal:authsignal-android:3.2.0")
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-authsignal",
"version": "2.1.0",
"version": "2.2.0",
"description": "The official Authsignal React Native library.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
17 changes: 17 additions & 0 deletions src/qr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NativeModules, Platform } from 'react-native';
import { handleErrorCodes, LINKING_ERROR } from './error';
import type {
AddCredentialInput,
AppChallenge,
AppCredential,
AuthsignalResponse,
ClaimChallengeInput,
Expand Down Expand Up @@ -84,6 +85,22 @@ export class AuthsignalQrCode {
}
}

async getChallenge(): Promise<AuthsignalResponse<AppChallenge | undefined>> {
await this.ensureModuleIsInitialized();

try {
const data = await AuthsignalQRCodeModule.getChallenge();

return { data };
} catch (ex) {
if (this.enableLogging) {
console.log(ex);
}

return handleErrorCodes(ex);
}
}

async removeCredential(): Promise<AuthsignalResponse<boolean>> {
await this.ensureModuleIsInitialized();

Expand Down
Loading