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

fix(sdk): handle relative URLs in #handleAuthorizationResponse() #5

Merged

Conversation

aloisklink
Copy link
Contributor

@aloisklink aloisklink commented Nov 21, 2023

I was trying out Mermaid-Chart/vscode-mermaid-chart#6 and was getting an error like URL is not valid, due to missing a baseUrl on

public async handleAuthorizationResponse(urlString: string) {
const url = new URL(urlString);

Since we never actually need the hostname for this URL, I've just given it a dummy baseURL, like

const url = new URL(urlString, 'https://dummy.invalid');

While implementing this, I also added some tests and basic CI to sanity check that this code actually worked!

@aloisklink aloisklink added the bug Something isn't working label Nov 21, 2023
Copy link

vercel bot commented Nov 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
office-plugin-site ⬜️ Ignored (Inspect) Nov 21, 2023 2:51pm

@sidharthv96 sidharthv96 merged commit 838d435 into main Nov 24, 2023
@aloisklink aloisklink deleted the fix/handle-relative-urls-in-handleAuthorizationResponse branch November 24, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants