@@ -80,7 +80,7 @@ export default class App extends React.Component<any, State> {
8080
8181 private signTransaction = async ( username : string ) : Promise < void > => {
8282 try {
83- const response = await TSAuthenticationSDKModule . signTransaction ( username ) ;
83+ const response = await TSAuthenticationSDKModule . signWebauthnTransaction ( username ) ;
8484 const accessToken = await this . mockServer . getAccessToken ( ) ;
8585 const success = await this . mockServer . completeAuthentication ( accessToken . token , response . result ) ; // should change???
8686 if ( success ) {
@@ -117,7 +117,7 @@ export default class App extends React.Component<any, State> {
117117
118118 private register = async ( username : string , displayName : string ) : Promise < void > => {
119119 try {
120- const response = await TSAuthenticationSDKModule . register ( username , displayName ) ;
120+ const response = await TSAuthenticationSDKModule . registerWebAuthn ( username , displayName ) ;
121121 const accessToken = await this . mockServer . getAccessToken ( ) ;
122122 const success = await this . mockServer . completeRegistration ( accessToken . token , response . result , username ) ;
123123 if ( success ) {
@@ -135,7 +135,7 @@ export default class App extends React.Component<any, State> {
135135
136136 private authenticate = async ( username : string ) : Promise < void > => {
137137 try {
138- const response = await TSAuthenticationSDKModule . authenticate ( username ) ;
138+ const response = await TSAuthenticationSDKModule . authenticateWebAuthn ( username ) ;
139139 const accessToken = await this . mockServer . getAccessToken ( ) ;
140140 const success = await this . mockServer . completeAuthentication ( accessToken . token , response . result ) ;
141141 if ( success ) {
@@ -173,8 +173,6 @@ export default class App extends React.Component<any, State> {
173173 secret : config . secret
174174 }
175175 this . configureExampleApp ( appConfiguration ) ;
176- } else {
177- // this.showAppConfigurationDialog()
178176 }
179177 }
180178
@@ -185,6 +183,14 @@ export default class App extends React.Component<any, State> {
185183 appConfiguration . secret
186184 ) ;
187185
186+ if ( ! TSAuthenticationSDKModule . isWebAuthnSupported ( ) ) {
187+ this . setState ( { errorMessage : 'WebAuthn is not supported on this device' } ) ;
188+ return ;
189+ }
190+
191+ const deviceInfo = await TSAuthenticationSDKModule . getDeviceInfo ( ) ;
192+ console . log ( "Device Info: " , deviceInfo ) ;
193+
188194 TSAuthenticationSDKModule . initialize (
189195 appConfiguration . clientId ,
190196 appConfiguration . domain ,
0 commit comments