()
| 5 | // Runs in popup. |
| 6 | // TODO(prem): Move to a popup-specific source file. |
| 7 | export async function openAuthTab(): Promise<void> { |
| 8 | const uuid = uuidv4(); |
| 9 | await chrome.runtime.sendMessage({ |
| 10 | type: 'state', |
| 11 | payload: { |
| 12 | state: uuid, |
| 13 | }, |
| 14 | }); |
| 15 | const profileUrl = await getGeneralProfileUrl(); |
| 16 | |
| 17 | await chrome.tabs.create({ |
| 18 | url: `${profileUrl}?redirect_uri=chrome-extension://${chrome.runtime.id}&state=${uuid}`, |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | // Runs in service worker. |
| 23 | // TODO(prem): Move to a service worker-specific source file. |
nothing calls this directly
no test coverage detected