Skip to content

Commit

Permalink
Change order of a function for the sake of codelab
Browse files Browse the repository at this point in the history
Change-Id: Ia0ae705bb807a2447329ba3a21ee2c026cbb34f5
  • Loading branch information
agektmr committed May 22, 2019
1 parent ebf352b commit 6bf1cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ export const authenticate = async (opts) => {

const options = await _fetch(url, opts);

options.challenge = base64url.decode(options.challenge);

if (!options.allowCredentials) {
console.info('No registered credentials found.');
return Promise.resolve(null);
}

options.challenge = base64url.decode(options.challenge);

for (let cred of options.allowCredentials) {
cred.id = base64url.decode(cred.id);
}
Expand Down

0 comments on commit 6bf1cb1

Please sign in to comment.