Token Login

Solved!
Posted in General by matthias Sat Aug 13 2016 20:55:07 GMT+0000 (UTC)·2·Viewed 1,001 times

Hi Is it possible to create with buddy a token login? I mean that I can save a token with to an user, so that a device can do a login without a password and an username? Or is it possible to do a login over an email verification? ty
Bradley Serbus
Aug 13, 2016

Hi Ty,

User tokens are created when you login a user with a user and password. For more details on the loginUser method see http://docs.buddy.com/docs/user-login, and to see the underlying REST call see http://docs.buddy.com/docs/rest-api. After you get the user token, pass it up with every request. Keep in mind that the SDKs handle saving the token for you, so after a user logs in using the SDK's loginUser method, the SDKs will send up the user token on your behalf with every call, even across app launches.

It's possible to emulate email verification by using our Password Reset APIs (http://docs.buddy.com/docs/request-password-reset & http://docs.buddy.com/docs/reset-password). The steps would be a follows:

  1. Surface UI to allow a user to enter their email address (and optionally a user name). Then create a Buddy user with that information and a randomly-generated password (http://docs.buddy.com/docs/create-user), and surface a message to the user telling them to check their inbox for email verification.
  2. Initiate a password reset request (http://docs.buddy.com/docs/request-password-reset), with a message saying something like: "Use the enclosed code to verify your email address.
  3. Surface UI in your app accepting the code, and a password field (and optionally a user name field). Use those in the password reset (http://docs.buddy.com/docs/reset-password).

Thanks,
Brad


Bradley Serbus marked this as solved
Markdown is allowed