Skip to content

Commit

Permalink
fix(OAuth): client identity matching (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkfkan authored Jun 28, 2023
1 parent 89548ad commit 07c1b3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/OAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class OAuth {
client_id: this.#identity.client_id,
scope: Constants.OAUTH.SCOPE,
device_id: Platform.shim.uuidv4(),
model_name: Constants.OAUTH.MODEL_NAME
device_model: Constants.OAUTH.MODEL_NAME
};

const response = await this.#session.http.fetch_function(new URL('/o/oauth2/device/code', Constants.URLS.YT_BASE), {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const OAUTH = Object.freeze({
}),
REGEX: Object.freeze({
AUTH_SCRIPT: /<script id="base-js" src="(.*?)" nonce=".*?"><\/script>/,
CLIENT_IDENTITY: /.+?={};var .+?={clientId:"(?<client_id>.+?)",.+?:"(?<client_secret>.+?)"},/
CLIENT_IDENTITY: /var .+?={clientId:"(?<client_id>.+?)",.+?:"(?<client_secret>.+?)".+?}/
})
});
export const CLIENTS = Object.freeze({
Expand Down

0 comments on commit 07c1b3e

Please sign in to comment.