Skip to content

Commit

Permalink
他ブラウザへの対応1 (#79)
Browse files Browse the repository at this point in the history
* use `chrome.identity.getRedirectURL()` to generate per browser redirect url

* ignore chrome key when blank

* fmt
  • Loading branch information
onokatio authored Oct 12, 2023
1 parent 5a5fcf0 commit e379be8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/repositories/trello.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export class Trello extends Repository {
{
url:
'https://trello.com/1/OAuthAuthorizeToken?expiration=never' +
`&name=${config.trello.app_name}&scope=${config.trello.scopes}&key=${config.trello.key}&return_url=https://${chrome.runtime.id}.chromiumapp.org/`,
`&name=${config.trello.app_name}&scope=${
config.trello.scopes
}&key=${
config.trello.key
}&return_url=${chrome.identity.getRedirectURL()}`,
interactive: true,
},
async (responseUrl) => {
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ const webpackConfig: ConfigurationFactory = () => {
const json = JSON.parse(content.toString())
json.oauth2.client_id = config.google.client_id
json.oauth2.scopes = config.google.scopes
json.key = config.key
if (config.key != '') {
json.key = config.key
}
return JSON.stringify(json)
},
},
Expand Down

0 comments on commit e379be8

Please sign in to comment.