Skip to content

Conversation

@DominikPalo
Copy link

@DominikPalo DominikPalo commented Oct 12, 2021

The "302 Found HTTP" response is a common way of performing URL redirection. We use the swifter framework in our projects for creating a local webserver handling OAuth2 flow and the 302 Found HTTP response is a recommended way for redirecting to the OAuth2 success pages.

I created this PR to make things easier, so instead of writing

server[self.callbackPath] = { _ in
	return .raw(302, "Found", ["Location": authSuccessUri], nil)
}

we could just write

server[self.callbackPath] = { _ in
	return .found(authSuccessUri)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant