Skip to content

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed May 17, 2023
1 parent ebad0a3 commit cccd74c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ _Breaking changes, which may affect downstream projects, are marked with a_ ⚠
[#xxx]: https://github.com/osmlab/osm-auth/issues/xxx
-->

## 2.1.0
##### 2023-May-17
* Add fetch wrapper ([#112], thanks [@dschep])
* Fix singlepage authentication support ([#113], thanks [@dschep])

[#112]: https://github.com/osmlab/osm-auth/issues/112
[#113]: https://github.com/osmlab/osm-auth/issues/113
[@dschep]: https://github.com/dschep


## 2.0.1
##### 2022-Sep-27
* Fix `osm-auth.d.ts` types declaration ([#106], thanks [@caspg])
Expand Down
13 changes: 10 additions & 3 deletions dist/osm-auth.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ function osmAuth(o) {
response_type: "code",
scope: o.scope
});
if (!o.singlepage) {
if (o.singlepage) {
var params = utilStringQs(window.location.search.slice(1));
if (params.code) {
getAccessToken(params.code);
} else {
window.location = url;
}
} else {
var w = 600;
var h = 550;
var settings = [
Expand All @@ -76,8 +83,8 @@ function osmAuth(o) {
}
}
window.authComplete = function(url2) {
var params = utilStringQs(url2.split("?")[1]);
getAccessToken(params.code);
var params2 = utilStringQs(url2.split("?")[1]);
getAccessToken(params2.code);
delete window.authComplete;
};
function getAccessToken(auth_code) {
Expand Down
6 changes: 3 additions & 3 deletions dist/osm-auth.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/osm-auth.iife.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/osm-auth.iife.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "osm-auth",
"version": "2.0.1",
"version": "2.1.0",
"license": "ISC",
"repository": "github:osmlab/osm-auth",
"description": "A usable example of JavaScript OAuth 2.0 with OpenStreetMap",
Expand All @@ -11,6 +11,7 @@
],
"contributors": [
"Bryan Housel <[email protected]> (https://github.com/bhousel)",
"Daniel Schep (https://github.com/dschep)",
"Hel Nershing Thapa (https://github.com/HelNershingThapa)",
"Tom MacWright <[email protected]> (https://github.com/tmcw)"
],
Expand Down Expand Up @@ -50,4 +51,4 @@
"engines": {
"node": ">=16"
}
}
}

0 comments on commit cccd74c

Please sign in to comment.