serverless / platform-sdk

Serverless Platform SDK
Apache License 2.0
17 stars 7 forks source link

Update username save #86

Closed alexdebrie closed 4 years ago

alexdebrie commented 4 years ago

Makes a few changes to saving data in the serverlessrc file from the Websocket connection, specifically:

  1. It uses data.username (passed down from the Websocket) rather than the nickname property from the decoded JWT. The nickname property is the username (GitHub) or beginning of email address (Email / Google) rather than our SFE username.

  2. Based on whether the message is sent from login or register, we might receive an expires_in or expires_at property. It normalizes how it handles this to cover both cases.

Also updated the config to use http for a local backend.