/
login(phonenumber:code:audience:scope:)-38nv0.json
1 lines (1 loc) · 13.6 KB
/
login(phonenumber:code:audience:scope:)-38nv0.json
1
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"login"},{"kind":"text","text":"("},{"kind":"externalParam","text":"phoneNumber"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"code"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"audience"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Request","preciseIdentifier":"s:5Auth07RequestV","text":"Request"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Credentials","preciseIdentifier":"c:@M@Auth0@objc(cs)A0Credentials","text":"Credentials"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/AuthenticationError","preciseIdentifier":"s:5Auth019AuthenticationErrorV","text":"AuthenticationError"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["iOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Request that will yield Auth0 user’s credentials."}]}]},{"kind":"parameters","parameters":[{"name":"phoneNumber","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Phone number the user used to start the passwordless login flow."}]}]},{"name":"code","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"One-time password (OTP) code the user received via SMS."}]}]},{"name":"audience","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"API Identifier that your application is requesting access to. Defaults to "},{"type":"codeVoice","code":"nil"},{"type":"text","text":"."}]}]},{"name":"scope","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Space-separated list of requested scope values. Defaults to "},{"type":"codeVoice","code":"openid profile email"},{"type":"text","text":"."}]}]}]},{"kind":"content","content":[{"anchor":"Usage","level":2,"type":"heading","text":"Usage"},{"type":"codeListing","syntax":"swift","code":["Auth0"," .authentication()"," .login(phoneNumber: \"+12025550135\", code: \"123456\")"," .start { result in"," switch result {"," case .success(let credentials):"," print(\"Obtained credentials: \\(credentials)\")"," case .failure(let error):"," print(\"Failed with: \\(error)\")"," }"," }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also specify audience (the Auth0 API identifier) and scope values:"}]},{"type":"codeListing","syntax":"swift","code":["Auth0"," .authentication()"," .login(phoneNumber: \"+12025550135\","," code: \"123456\","," audience: \"https:\/\/example.com\/api\","," scope: \"openid profile email offline_access\")"," .start { print($0) }"]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Passwordless OTP Grant "},{"type":"codeVoice","code":"http:\/\/auth0.com\/oauth\/grant-type\/passwordless\/otp"},{"type":"text","text":". Check"},{"type":"text","text":" "},{"type":"reference","isActive":true,"identifier":"https:\/\/auth0.com\/docs\/get-started\/applications\/application-grant-types"},{"type":"text","text":" for more information."}]}],"type":"aside","name":"Requires"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/auth0\/authentication\/login(phonenumber:code:audience:scope:)-38nv0"],"traits":[{"interfaceLanguage":"swift"}]}],"defaultImplementationsSections":[{"title":"Authentication Implementations","identifiers":["doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Authentication\/login(phoneNumber:code:audience:scope:)-8kbii"]}],"identifier":{"url":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Authentication\/login(phoneNumber:code:audience:scope:)-38nv0","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Logs in a user using a phone number and an OTP code received via SMS. This is the last part of the passwordless login flow."}],"kind":"symbol","metadata":{"role":"symbol","title":"login(phoneNumber:code:audience:scope:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"login"},{"kind":"text","text":"("},{"kind":"externalParam","text":"phoneNumber"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"code"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"audience"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Request","preciseIdentifier":"s:5Auth07RequestV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Credentials","preciseIdentifier":"c:@M@Auth0@objc(cs)A0Credentials"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"AuthenticationError","preciseIdentifier":"s:5Auth019AuthenticationErrorV"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:5Auth014AuthenticationP5login11phoneNumber4code8audience5scopeAA7RequestVyAA11CredentialsCAA0B5ErrorVGSS_S2SSgSStF","required":true,"modules":[{"name":"Auth0"}]},"hierarchy":{"paths":[["doc:\/\/com.auth0.Auth0\/documentation\/Auth0","doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Authentication"]]},"seeAlsoSections":[{"title":"Related Documentation","identifiers":["https:\/\/auth0.com\/docs\/api\/authentication#authenticate-user","https:\/\/auth0.com\/docs\/api\/authentication#post-passwordless-verify"]}],"references":{"doc://com.auth0.Auth0/documentation/Auth0/Credentials":{"role":"symbol","title":"Credentials","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Credentials"}],"abstract":[{"type":"text","text":"User’s credentials obtained from Auth0."}],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Credentials","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Credentials"}],"url":"\/documentation\/auth0\/credentials"},"doc://com.auth0.Auth0/documentation/Auth0/Request":{"role":"symbol","title":"Request","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Request"}],"abstract":[{"type":"text","text":"Auth0 API request."}],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Request","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Request"}],"url":"\/documentation\/auth0\/request"},"doc://com.auth0.Auth0/documentation/Auth0/Authentication":{"role":"symbol","title":"Authentication","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"Authentication"}],"abstract":[{"type":"text","text":"Client for the "},{"type":"reference","isActive":true,"identifier":"https:\/\/auth0.com\/docs\/api\/authentication"},{"type":"text","text":"."}],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Authentication","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Authentication"}],"url":"\/documentation\/auth0\/authentication"},"doc://com.auth0.Auth0/documentation/Auth0/AuthenticationError":{"role":"symbol","title":"AuthenticationError","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthenticationError"}],"abstract":[{"type":"text","text":"Represents an error during a request to the Auth0 Authentication API."}],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/AuthenticationError","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AuthenticationError"}],"url":"\/documentation\/auth0\/authenticationerror"},"https://auth0.com/docs/api/authentication":{"title":"Auth0 Authentication API","titleInlineContent":[{"type":"text","text":"Auth0 Authentication API"}],"type":"link","identifier":"https:\/\/auth0.com\/docs\/api\/authentication","url":"https:\/\/auth0.com\/docs\/api\/authentication"},"https://auth0.com/docs/api/authentication#authenticate-user":{"title":"Authentication API Endpoint","titleInlineContent":[{"type":"text","text":"Authentication API Endpoint"}],"type":"link","identifier":"https:\/\/auth0.com\/docs\/api\/authentication#authenticate-user","url":"https:\/\/auth0.com\/docs\/api\/authentication#authenticate-user"},"https://auth0.com/docs/get-started/applications/application-grant-types":{"title":"our documentation","titleInlineContent":[{"type":"text","text":"our documentation"}],"type":"link","identifier":"https:\/\/auth0.com\/docs\/get-started\/applications\/application-grant-types","url":"https:\/\/auth0.com\/docs\/get-started\/applications\/application-grant-types"},"doc://com.auth0.Auth0/documentation/Auth0/Authentication/login(phoneNumber:code:audience:scope:)-8kbii":{"role":"symbol","title":"login(phoneNumber:code:audience:scope:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"login"},{"kind":"text","text":"("},{"kind":"externalParam","text":"phoneNumber"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"code"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"audience"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Request","preciseIdentifier":"s:5Auth07RequestV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Credentials","preciseIdentifier":"c:@M@Auth0@objc(cs)A0Credentials"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"AuthenticationError","preciseIdentifier":"s:5Auth019AuthenticationErrorV"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Logs in a user using a phone number and an OTP code received via SMS. This is the last part of the passwordless login flow."}],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Authentication\/login(phoneNumber:code:audience:scope:)-8kbii","kind":"symbol","type":"topic","url":"\/documentation\/auth0\/authentication\/login(phonenumber:code:audience:scope:)-8kbii"},"https://auth0.com/docs/api/authentication#post-passwordless-verify":{"title":"Error Responses","titleInlineContent":[{"type":"text","text":"Error Responses"}],"type":"link","identifier":"https:\/\/auth0.com\/docs\/api\/authentication#post-passwordless-verify","url":"https:\/\/auth0.com\/docs\/api\/authentication#post-passwordless-verify"},"doc://com.auth0.Auth0/documentation/Auth0/Authentication/login(phoneNumber:code:audience:scope:)-38nv0":{"defaultImplementations":1,"role":"symbol","title":"login(phoneNumber:code:audience:scope:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"login"},{"kind":"text","text":"("},{"kind":"externalParam","text":"phoneNumber"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"code"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"audience"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Request","preciseIdentifier":"s:5Auth07RequestV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Credentials","preciseIdentifier":"c:@M@Auth0@objc(cs)A0Credentials"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"AuthenticationError","preciseIdentifier":"s:5Auth019AuthenticationErrorV"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Logs in a user using a phone number and an OTP code received via SMS. This is the last part of the passwordless login flow."}],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0\/Authentication\/login(phoneNumber:code:audience:scope:)-38nv0","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/auth0\/authentication\/login(phonenumber:code:audience:scope:)-38nv0"},"doc://com.auth0.Auth0/documentation/Auth0":{"role":"collection","title":"Auth0","abstract":[],"identifier":"doc:\/\/com.auth0.Auth0\/documentation\/Auth0","kind":"symbol","type":"topic","url":"\/documentation\/auth0"}}}