Skip to content

Commit

Permalink
Allow app to be hosted on same server as provider (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
moberwasserlechner committed Aug 27, 2020
1 parent ac30506 commit ae758af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
## [Unreleased]


## [2.1.0] - 2020-08-28
## [2.1.0] - 2020-08-27

### Added

* Sign in with Apple. closes #45.
The plugin will detect that the iOS 13+ buildin UI is needed, when `authorizationBaseUrl` contains `https://appleid.apple.com/auth/authorize`.
This is needed for other platforms and iOS <=12 anyway, although other platforms are not yet supported.
* ios: Sign in with Apple. Closes [#45](https://github.com/moberwasserlechner/capacitor-oauth2/issues/45).
The plugin will detect that the iOS 13+ buildin UI is needed, when `authorizationBaseUrl` contains `appleid.apple.com`.
This is needed for other platforms and iOS <=12 anyway. Android, web, iOS <12 are not supported in this release.

### Fixed

* web: Make web flow work if server and client are hosted on same server. Closes [#94](https://github.com/moberwasserlechner/capacitor-oauth2/issues/94). thx [@klot-git](https://github.com/klot-git)

### Changed

* iOS: Upgrade SwiftOAuth2 to head
* iOS: Upgrade SwiftOAuth2 to head. Closes [#105](https://github.com/moberwasserlechner/capacitor-oauth2/issues/105)

## [2.0.0] - 2020-04-20

Expand Down
4 changes: 2 additions & 2 deletions src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class OAuth2ClientPluginWeb extends WebPlugin implements OAuth2ClientPlug
if (loopCount-- < 0) {
this.closeWindow();
} else if (this.windowHandle.closed && !this.windowClosedByPlugin) {
clearInterval(this.intervalId);
window.clearInterval(this.intervalId);
reject(new Error("USER_CANCELLED"));
} else {
let href: string;
Expand All @@ -64,7 +64,7 @@ export class OAuth2ClientPluginWeb extends WebPlugin implements OAuth2ClientPlug
// ignore DOMException: Blocked a frame with origin "http://localhost:4200" from accessing a cross-origin frame.
}

if (href != null) {
if (href != null && href.indexOf(this.webOptions.redirectUrl) >= 0) {
let urlParamObj = WebUtils.getUrlParams(href);
if (urlParamObj) {
window.clearInterval(this.intervalId);
Expand Down

0 comments on commit ae758af

Please sign in to comment.