Session details

Session details are added to the context object by the Converse servers. For example:
Example Returns
context.accessToken The access token that is returned when account linking uses OAuth authentication.
context.authCode The authorization code that is returned when the user links their account.
context.authCodeParts An array of the authcode when multiple items are returned by the account linking process.

For example 123456789|123 where 123456789 is the token and 123 is the user ID. You would access the user ID like this:

var secondItem = context.authCodeParts[1]

Arrays have a starting index of 0 so the first part is 0 and the second part is 1.

context.deviceAgent The operating system of the user's device. This is one of the following:
  • MAC OS X
  • iPhone OS
context.sessionId The current user's session ID. Note that this is read only.

See also:

Using the returned authorization code

Supporting OAuth authorization