Skip to content

Commit 7c87f8b

Browse files
committed
fix oauth again
1 parent 4c6c7af commit 7c87f8b

5 files changed

Lines changed: 19 additions & 21 deletions

File tree

assets/3rdparty/osm-js-editor/api.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var auth = osmAuth.osmAuth({
77
redirect_uri: window.location.origin + window.location.pathname + "land.html",
88
scope: "read_prefs write_api",
99
singlepage: false,
10-
url: 'https://www.openstreetmap.org'
1110
});
1211

1312
function basic_auth() {

assets/3rdparty/osm-js-editor/osm-auth_2.4.0/osm-auth.iife.min.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

assets/3rdparty/osm-js-editor/osm-auth_3/osm-auth.iife.min.js

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ <h4 class="media-heading" data-l10n-id="modal_about_category_contributors">
473473
<script src="assets/3rdparty/leaflet-hash/leaflet-hash.js"></script>
474474
<script src="assets/3rdparty/leaflet-locate/L.Control.Locate.min.js"></script>
475475
<script src="assets/js/utilities.js"></script>
476-
<script src="assets/3rdparty/osm-js-editor/osm-auth_2.4.0/osm-auth.iife.min.js"></script>
476+
<script src="assets/3rdparty/osm-js-editor/osm-auth_3/osm-auth.iife.min.js"></script>
477477
<script src="assets/3rdparty/osm-js-editor/api.js"></script>
478478
<script src="assets/3rdparty/osm-js-editor/editor.js"></script>
479479
<script src="assets/js/beer-layer.js"></script>

land.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<!DOCTYPE html>
2-
<html>
3-
<head></head>
4-
5-
<body>
6-
<!-- cette page est nécessaire pour faire fonctionner l'authentification oauth -->
7-
<script>
8-
opener.authComplete(window.location.href);
9-
window.close();
10-
</script>
11-
</body>
12-
</html>
2+
<html><head></head>
3+
<body>
4+
<script>
5+
if (new URLSearchParams(location.search).has("code")) {
6+
new BroadcastChannel("osm-api-auth-complete").postMessage(location.href);
7+
window.close();
8+
}
9+
</script>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)