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

Oauthsession logout endpoint cors error #1346

Open
Str4nge1 opened this issue Aug 7, 2023 · 0 comments
Open

Oauthsession logout endpoint cors error #1346

Str4nge1 opened this issue Aug 7, 2023 · 0 comments
Labels
p3 Priority 3 typescript Typescript or Javascript SDK issues

Comments

@Str4nge1
Copy link

Str4nge1 commented Aug 7, 2023

Hello, I have set up Looker Oauth using OauthSession class provided by @looker/sdk-rtl package. I'm implementing OauthSettings class as follows:

class OauthSettings extends ApiSettings {
  constructor(private settings: IApiSettings = defaultConfig) {
    super(settings);
  }

  readConfig(_section?: string | undefined): IApiSection {
    return this.settings;
  }
}

after this as the next step, I'm creating an instance of OauthSettings class:

const settings = new OauthSettings(defaultConfig);

and then using created instance to initialize browser services:

const browserServices = new BrowserServices({ settings });

finally, constructing OAuthSession class with my broswerServices:

return new OAuthSession(browserServices);

In my application the methods provided by OAuthSession class: login and redeemAuthCode are working fine. I'm able to login user and redeem auth code returned by Looker UI host (take note that, when I'm calling redeemAuthCode method of OauthSession class it performs API call to /token endpoint). The problem occurs while I'm trying to call OAuthSession logout method, basically, it gives CORS error for some reason. So at the end of the day API call to /api/token endpoint works well but /api/logout endpoint fails with CORS error. Is there anything that I can do to avoid/fix this error in my application scope?
Thanks in advance.

@github-actions github-actions bot added p3 Priority 3 need triage labels Aug 7, 2023
@drstrangelooker drstrangelooker added typescript Typescript or Javascript SDK issues and removed need triage labels Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 Priority 3 typescript Typescript or Javascript SDK issues
Projects
None yet
Development

No branches or pull requests

2 participants