web: fix authentification with Plex on iOS (#4095)
* web: fix authentification with Plex on iOS Fixes issue #3822 * fixup Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * add fallback button Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -62,7 +62,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> { | ||||
|     send = async (data: PlexSource): Promise<PlexSource> => { | ||||
|         data.plexToken = this.plexToken || ""; | ||||
|         let source: PlexSource; | ||||
|         if (this.instance) { | ||||
|         if (this.instance?.pk) { | ||||
|             source = await new SourcesApi(DEFAULT_CONFIG).sourcesPlexUpdate({ | ||||
|                 slug: this.instance.slug, | ||||
|                 plexSourceRequest: data, | ||||
| @ -95,7 +95,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> { | ||||
|  | ||||
|     async doAuth(): Promise<void> { | ||||
|         const authInfo = await PlexAPIClient.getPin(this.instance?.clientId || ""); | ||||
|         const authWindow = popupCenterScreen(authInfo.authUrl, "plex auth", 550, 700); | ||||
|         const authWindow = await popupCenterScreen(authInfo.authUrl, "plex auth", 550, 700); | ||||
|         PlexAPIClient.pinPoll(this.instance?.clientId || "", authInfo.pin.id).then((token) => { | ||||
|             authWindow?.close(); | ||||
|             this.plexToken = token; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Bastien Rivière
					Bastien Rivière