Skip to content

Commit

Permalink
Merge pull request #109 from supportkit/f/1.0-release-notes-login-docs
Browse files Browse the repository at this point in the history
1.0 release notes and login docs
  • Loading branch information
lemieux committed Sep 30, 2015
2 parents 8f0642f + 5e6b237 commit 7e37014
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,30 @@ Closes the conversation widget
SupportKit.close();
```

#### login(userId [, jwt])
Logs a user in the widget, retrieving the conversation that user already had on other browsers and/or devices. This will destroy and reinitialize the widget with the user's data. Note that you don't need to call this after `init`, it's already done internally. This returns a promise that resolves when the widget is ready again.
```
SupportKit.login('some-id');
// in case you are using the jwt authentication
SupportKit.login('some-id', 'some-jwt');
```

#### logout()
Removes deviceId cookie from the browser, effectively logging out the user.
Destroys the widget completely. Can be initiated again manually with `SupportKit.init(...)`
Logs out the current user and reinitialize the widget with an anonymous user.This returns a promise that resolves when the widget is ready again.

```
SupportKit.logout();
```

#### destroy()
Destroys the widget and makes it disappear. The widget has to be reinitialized with `init` to be working again because it also clears up the app token from the widget.

```
SupportKit.destroy();
```

#### sendMessage(text)
Sends a message on the user's behalf

Expand Down
28 changes: 28 additions & 0 deletions release_notes/v1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Web SDK is now 1.0!

We cooked up a big release for this milestone. We already had cool features like the actions buttons on our mobile SDKs, but now, you can also have them! We also packed this release with a lot of fixes and new things that will surely be useful to a lot of you guys.

# Web SDK is seeing some action!
![SupportKit Web Action Buttons](http://docs.supportkit.io/images/action_button_web.png)

The Web SDK now features Actions!
You can now send Actions along with messages to your users. This makes it easier to direct your users to some part of your website and help them find exactly what they need.

See our [docs](http://docs.supportkit.io/javascript#sending-action-buttons) for all the details.

# Login, Logout, JWT and your conversation everywhere

You can now specify a `userId` and (optionally) a JSON Web Token (JWT) to securely log users in and out of your application. Every user session will hold its own conversation and properties. That same user is now able to log in into their iOS device, Android device, or on your website and retain their conversation!

As usual, see our [docs](http://docs.supportkit.io/javascript#users-on-multiple-devices) for the details.

# Fixes and improvements

- We rewrote the whole communication layer to not rely on `jQuery.ajax`. This means no more problems with Authorization headers when you are using the JWT in your own app.
- You can now send links in your messages. We added a link detection feature that will render them correctly. It's currently pretty basic and will detect anything under the following format: `procotol://uri` so you could send a normal url or even some link to iTunes or the Play store if you wanted to. We are not detecting emails for now, but you could achieve that with action buttons!
- We worked hard on building a better experience on mobile. The widget should now use the whole screen when opened.
- A lot of CSS fixes

# API Additions

1. SupportKit global now has `login` and `logout`. Check out our [README](https://github.com/supportkit/supportkit-js) for a more complete API description.

0 comments on commit 7e37014

Please sign in to comment.