Skip to content

Instantly share code, notes, and snippets.

@neilk
Forked from gr2m/account_dreamcode.js
Created May 2, 2013 21:29
Show Gist options
  • Select an option

  • Save neilk/5505612 to your computer and use it in GitHub Desktop.

Select an option

Save neilk/5505612 to your computer and use it in GitHub Desktop.

Revisions

  1. @gr2m gr2m created this gist Apr 25, 2013.
    23 changes: 23 additions & 0 deletions account_dreamcode.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    // sign up
    account.signUp('joe@example.com', 'secret');

    // sign in
    account.signIn('joe@example.com', 'secret');

    // sign in via oauth
    account.signInWith('twitter');

    // sign out
    account.signOut();

    // change password
    account.changePassword('currentpassword', 'newpassword');

    // change username
    account.changeUsername('currentpassword', 'newusername');

    // reset password
    account.resetPassword('joe@example.com');

    // destroy account and all its data
    account.destroy();