Skip to content

Commit 51cbc30

Browse files
committed
v3.1.0
1 parent c5217bc commit 51cbc30

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ _Breaking changes, which may affect downstream projects, are marked with a_ ⚠
1414
1515
[#xxx]: https://github.com/osmlab/osm-auth/issues/xxx
1616
-->
17-
# 3.1.0
18-
##### 2025-??
17+
18+
## 3.1.0
19+
##### 2025-Oct-21
1920
* Remove Web Crypto API checking code and references to `window` ([#139],[#140], thanks [@tom-konda])
2021
* Detect if user tried to deny access in popup, notify BroadcastChannel ([#141], thanks [@ENT8R])
2122
* This project uses [`bun`](https://bun.com/) now for simpler developer tooling ([#142])

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See also: https://wiki.openstreetmap.org/wiki/OAuth
99
> [!IMPORTANT]
1010
> Due to [security changes on 8 July 2025](https://github.com/openstreetmap/openstreetmap-website/commit/2ff4d6), authentication using the `popup` mode will not work until you:
1111
>
12-
> 1. update this library to v3.0.0
12+
> 1. update this library to >= v3.0.0
1313
> 2. AND update the code snippet in your `land.html` file to the latest version (see [this example](https://github.com/osmlab/osm-auth/tree/master/land.html))
1414
1515

@@ -57,11 +57,18 @@ You can also use **osm-auth** directly in a web browser. A good way to do this
5757
When you load this file in a `<script>` tag, you'll get a `osmAuth` global to use elsewhere in your scripts:
5858
```html
5959
<head>
60-
<script src="https://cdn.jsdelivr.net/npm/osm-auth@3/dist/osm-auth.iife.min.js"></script>
60+
<script src="https://cdn.jsdelivr.net/npm/osm-auth@latest/dist/osm-auth.iife.min.js"></script>
6161
</head>
6262
6363
<script>
64-
// example here
64+
var redirectPath = window.location.origin + window.location.pathname;
65+
var auth = osmAuth({
66+
client_id: "",
67+
scope: "read_prefs",
68+
redirect_uri: redirectPath + "land.html",
69+
singlepage: true
70+
});
71+
6572
</script>
6673
```
6774

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset='utf-8'/>
55
<title>osm-auth</title>
6-
<script src="https://cdn.jsdelivr.net/npm/osm-auth@3/dist/osm-auth.iife.min.js"></script>
6+
<script src="https://cdn.jsdelivr.net/npm/osm-auth@latest/dist/osm-auth.iife.min.js"></script>
77
<link href='style.css' rel='stylesheet' type='text/css'/>
88
</head>
99

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "osm-auth",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"license": "ISC",
55
"repository": "github:osmlab/osm-auth",
66
"description": "A usable example of JavaScript OAuth 2.0 with OpenStreetMap",

0 commit comments

Comments
 (0)