Skip to content

Commit

Permalink
fix: verifier config
Browse files Browse the repository at this point in the history
  • Loading branch information
metalurgical committed Sep 30, 2024
1 parent 14ebba4 commit 972d909
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CustomAuthDemo/CustomAuthDemo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct ContentView: View {
Task {
do {
let sub = SingleLoginParams(typeOfLogin: .email_passwordless,
verifier: "torus-auth0-passwordless", clientId: "P7PJuBCXIHP41lcyty0NEb7Lgf7Zme8Q",
verifier: "torus-auth0-email-passwordless-lrc", clientId: "P7PJuBCXIHP41lcyty0NEb7Lgf7Zme8Q",
jwtParams: Auth0ClientOptions(verifierIdField: "name", login_hint: inputDetail, flow_type: .link))
let customAuthArgs = CustomAuthArgs(urlScheme: "tdsdk://tdsdk/oauthCallback", network: .legacy(.TESTNET), enableOneKey: true, web3AuthClientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ")
let customAuth = try CustomAuth(config: customAuthArgs)
Expand All @@ -171,7 +171,7 @@ struct ContentView: View {
Task {
do {
let sub = SingleLoginParams(typeOfLogin: .sms_passwordless,
verifier: "torus-auth0-sms-passwordless", clientId: "nSYBFalV2b1MSg5b2raWqHl63tfH3KQa",
verifier: "torus-sms-passwordless-lrc", clientId: "nSYBFalV2b1MSg5b2raWqHl63tfH3KQa",
jwtParams: Auth0ClientOptions(login_hint: inputDetail, flow_type: .code))
let customAuthArgs = CustomAuthArgs(urlScheme: "tdsdk://tdsdk/oauthCallback", network: .legacy(.TESTNET), enableOneKey: true, web3AuthClientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ")
let customAuth = try CustomAuth(config: customAuthArgs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ internal class Web3AuthPasswordlessHandler: AbstractLoginHandler {
let decodedToken = try decode(jwt: idToken!)
let result = Auth0UserInfo(picture: decodedToken.body["picture"] as? String ?? "", email: decodedToken.body["email"] as? String ?? "", name: decodedToken.body["name"] as? String ?? "", sub: "", nickname: "")

return TorusVerifierResponse(email: result.email, name: result.name.lowercased(), profileImage: result.picture, verifier: self.params.verifier, verifierId: try getVerifierId(userInfo: result, typeOfLogin: self.params.typeOfLogin, verifierIdField: verifierIdField, isVerifierIdCaseSensitive: isVerifierCaseSensitive), typeOfLogin: self.params.typeOfLogin)
return TorusVerifierResponse(email: result.email.lowercased(), name: result.name.lowercased(), profileImage: result.picture, verifier: self.params.verifier, verifierId: try getVerifierId(userInfo: result, typeOfLogin: self.params.typeOfLogin, verifierIdField: verifierIdField, isVerifierIdCaseSensitive: isVerifierCaseSensitive), typeOfLogin: self.params.typeOfLogin)
}
}
}

0 comments on commit 972d909

Please sign in to comment.