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

expose endpoint for google auth url #590

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

ravi-sawlani-yral
Copy link
Contributor

@ravi-sawlani-yral ravi-sawlani-yral commented Jan 8, 2025

Changes

  • expose endpoint for google auth url

Impact

@@ -26,6 +26,18 @@ async fn google_auth_redirector() -> Result<(), ServerFnError> {
Ok(())
}

#[server(endpoint = "google_auth_url", input = Json, output = Json)]
async fn google_auth_url(host: String) -> Result<(), ServerFnError> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just use the host header? its still set if you use a http client

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am was not sure if IOS have a mechanism to send host header

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Host header is sent by all http clients, reverse proxies wouldnt work without it :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC 9110 https://httpwg.org/specs/rfc9110.html#field.host
"The target URI's authority information is critical for handling a request. A user agent MUST generate a Host header field in a request unless it sends that information as an ":authority" pseudo-header field"

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.

Google Auth for IOS App.
2 participants