Skip to content

Commit c09e370

Browse files
authored
Fix Tesla token fetching (#99)
* Update redirect URL to use custom scheme for token generation * 0.13.0
1 parent 15fae08 commit c09e370

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [0.13.0] - 2026-04-22
4+
5+
- Fix Tesla login URL
6+
37
## [0.12.0] - 2026-02-25
48

59
- Build binary for `aarch64-unknown-linux-gnu`

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tesla_auth"
3-
version = "0.12.0"
3+
version = "0.13.0"
44
description = "Tesla token generator"
55
homepage = "https://github.com/adriankumpf/tesla_auth"
66
repository = "https://github.com/adriankumpf/tesla_auth"

src/auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const CLIENT_ID: &str = "ownerapi";
2222
const AUTH_URL: &str = "https://auth.tesla.com/oauth2/v3/authorize";
2323
const TOKEN_URL: &str = "https://auth.tesla.com/oauth2/v3/token";
2424
const TOKEN_URL_CN: &str = "https://auth.tesla.cn/oauth2/v3/token";
25-
const REDIRECT_URL: &str = "https://auth.tesla.com/void/callback";
25+
const REDIRECT_URL: &str = "tesla://auth/callback";
2626

2727
pub fn is_redirect_url(url: &Url) -> bool {
2828
url.as_str().starts_with(REDIRECT_URL)

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const INITIALIZATION_SCRIPT: &str = r#"
2525
window.addEventListener('DOMContentLoaded', (event) => {
2626
const url = window.location.toString();
2727
28-
if (url.startsWith("https://auth.tesla.com/void/callback")) {
28+
if (url.startsWith("tesla://auth/callback")) {
2929
document.querySelector("h1.h1").innerText = "Generating Tokens …";
3030
}
3131
});

0 commit comments

Comments
 (0)