Skip to content

Commit

Permalink
fix bug with immers-client on full immers not registering as full oau…
Browse files Browse the repository at this point in the history
…th clent
  • Loading branch information
wmurphyrd committed Sep 29, 2022
1 parent 2b0b3f8 commit 73bfe95
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v2.8.2 (2022-09-28)

### Fixed
* `ImmersClient.login` was failing to send clientId, causing full immers to be treated like destinations with limited permissions

## v2.8.1 (2022-09-21)

### Changed
Expand Down
3 changes: 2 additions & 1 deletion source/ImmersHUD/ImmersHUD.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import { roles } from '../authUtils'
* @prop {'true'|'false'} open - Toggles between icon and full HUD view (default: true is user's handle is saved but login is needed, false otherwise)
*
* @example <caption>Load & register the custom element via import (option 1)</caption>
* import 'immers-client/dist/ImmersHUD.bundle'
* import { ImmersHUD } from 'immers-client';
* ImmersHUD.Register();
* @example <caption>Load & register the custom element via CDN (option 2)</caption>
* <script type="module" src="https://cdn.jsdelivr.net/npm/immers-client/dist/ImmersHUD.bundle.js"></script>
* @example <caption>Using the custom element in HTML</caption>
Expand Down
3 changes: 2 additions & 1 deletion source/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ export class ImmersClient extends window.EventTarget {
async login (tokenCatcherURL, requestedRole, handle) {
let authResult
if (this.localImmer) {
authResult = await ImmerOAuthPopup(this.localImmer, this.place.id, requestedRole, tokenCatcherURL, handle)
const client = await this.localImmerPlaceObject
authResult = await ImmerOAuthPopup(this.localImmer, client.id, requestedRole, tokenCatcherURL, handle)
} else {
authResult = await DestinationOAuthPopup(handle, requestedRole, tokenCatcherURL)
}
Expand Down

0 comments on commit 73bfe95

Please sign in to comment.