Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use identity.getRedirectURL() #15

Closed
kkoscielniak opened this issue Feb 5, 2019 · 3 comments
Closed

Cannot use identity.getRedirectURL() #15

kkoscielniak opened this issue Feb 5, 2019 · 3 comments
Assignees
Labels

Comments

@kkoscielniak
Copy link

Hello @KeithHenry,

I'm trying to use chrome-extension-async in order to develop an extension which will use an OAuth login.

When trying to:

const getRedirectUrl = async() => {
  const url = await chrome.identity.getRedirectURL();
  return url;
}; 

I get this uncaught error:

Error: Invocation of form identity.getRedirectURL(function) doesn't match definition identity.getRedirectURL(optional string path)

Can you fix that?


Also, some workaround I've found for the future:

  1. Remove chrome-extension-async temporarily
  2. Invoke chrome.identity.getRedirectURL() in devtools console
@KeithHenry
Copy link
Owner

@kkoscielniak thanks for finding this - the problem is that getRedirectURL is included in the list of API functions to wrap, but it isn't a callback function.

I think the fix is to remove it from

'launchWebAuthFlow', 'getRedirectURL'],

PRs welcome! But otherwise I'll get it sorted tomorrow :-)

@KeithHenry KeithHenry self-assigned this Feb 5, 2019
@KeithHenry KeithHenry added the bug label Feb 5, 2019
KeithHenry added a commit that referenced this issue Feb 6, 2019
Also moved 3.3 bugfix builds to be under the 3.3 header
KeithHenry added a commit that referenced this issue Feb 6, 2019
@KeithHenry
Copy link
Owner

This is fixed in 3.3.2, live on npm https://www.npmjs.com/package/chrome-extension-async

@kkoscielniak
Copy link
Author

@KeithHenry Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants