Skip to content

Commit 4589349

Browse files
MOB-862 #comment test getDeviceInfo and isWebAuthnSupported
1 parent 781b898 commit 4589349

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

example/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ export default class App extends React.Component<any, State> {
188188
return;
189189
}
190190

191-
const deviceInfo = await TSAuthenticationSDKModule.getDeviceInfo();
192-
console.log("Device Info: ", deviceInfo);
193-
194-
TSAuthenticationSDKModule.initialize(
191+
await TSAuthenticationSDKModule.initialize(
195192
appConfiguration.clientId,
196193
appConfiguration.domain,
197194
`${appConfiguration.baseUrl}/cis/v1/`
198195
);
196+
197+
const deviceInfo = await TSAuthenticationSDKModule.getDeviceInfo();
198+
console.log("Device Info: ", deviceInfo);
199199
}
200200

201201
private isAppConfigured = (): boolean => {

ios/TsAuthentication.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ class TsAuthentication: NSObject {
9898

9999
switch deviceInfo {
100100
case .success(let response):
101-
let info = ["result": [
101+
let info = [
102102
"publicKeyId": response.publicKeyId,
103103
"publicKey": response.publicKey
104-
]]
104+
]
105105
resolve(info)
106106
case .failure(let error):
107107
reject(self.kTag, error.localizedDescription, error)

src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export namespace TSAuthenticationSDK {
2929
}
3030

3131
export interface DeviceInfo {
32-
32+
publicKeyId: string;
33+
publicKey: string;
3334
}
3435

3536
export const enum TSAuthenticationError {

0 commit comments

Comments
 (0)