diff --git a/CHANGELOG.md b/CHANGELOG.md index ed183fa..45a9634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v0.4.1](https://github.com/ibm-cloud-security/appid-clientsdk-js/releases/tag/0.4.1) (2020-07-21) + +**Added** + +- Update dependency versions + ## [v0.4.0](https://github.com/ibm-cloud-security/appid-clientsdk-js/releases/tag/0.4.0) (2020-04-10) **Added** diff --git a/README.md b/README.md index ab49c87..7d5aec4 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ import AppID from 'ibmcloud-appid-js'; From the CDN: ```html - + ``` Or for development purposes use the minified file in this repo: diff --git a/docs/AppID.html b/docs/AppID.html index a4fd9e9..444083e 100644 --- a/docs/AppID.html +++ b/docs/AppID.html @@ -826,7 +826,7 @@
import AppID from 'ibmcloud-appid-js';
From the CDN:
-<script src="https://cdn.appid.cloud.ibm.com/appid-0.3.0.min.js"></script>
+<script src="https://cdn.appid.cloud.ibm.com/appid-0.4.1.min.js"></script>
Or for development purposes use the minified file in this repo:
<script type='text/javascript' src="dist/appid.min.js"></script>
@@ -124,7 +124,7 @@ API Reference
diff --git a/docs/index.js.html b/docs/index.js.html
index 708b6d3..077e8e8 100644
--- a/docs/index.js.html
+++ b/docs/index.js.html
@@ -148,7 +148,15 @@ index.js
async signin() {
this._validateInitalize();
const endpoint = this.openIdConfigResource.getAuthorizationEndpoint();
- return this.utils.performOAuthFlowAndGetTokens({origin: this.window.origin, clientId: this.clientId, endpoint});
+ let origin = this.window.location.origin;
+ if (!origin) {
+ origin = this.window.location.protocol + "//" + this.window.location.hostname + (this.window.location.port ? ':' + this.window.location.port : '');
+ }
+ return this.utils.performOAuthFlowAndGetTokens({
+ origin,
+ endpoint,
+ clientId: this.clientId
+ });
}
/**
@@ -325,7 +333,7 @@ index.js
diff --git a/sample/public/index.html b/sample/public/index.html
index 4143632..aff97c5 100644
--- a/sample/public/index.html
+++ b/sample/public/index.html
@@ -49,8 +49,9 @@
let tokens;
try {
await appID.init({
- clientId: '',
- discoveryEndpoint: ''
+ clientId: '6757117a-4715-4f86-af8e-c9437de0cb86',
+ // discoveryEndpoint: 'https://eu-gb.appid.test.cloud.ibm.com/oauth/v4/d28b6a9a-f34c-4fcf-972b-5e957f029650/.well-known/openid-configuration'
+ discoveryEndpoint: 'http://localhost:6002/oauth/v4/d28b6a9a-f34c-4fcf-972b-5e957f029650/.well-known/openid-configuration'
});
} catch (e) {
console.error(e);