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

nhost success/failure URL settings #1202

Closed
diegonc opened this issue Nov 23, 2022 · 7 comments
Closed

nhost success/failure URL settings #1202

diegonc opened this issue Nov 23, 2022 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation stale

Comments

@diegonc
Copy link

diegonc commented Nov 23, 2022

Where should I configure the following URLs from the OAuth example?

/// Success redirect URL: `nhost-example://oauth.login.success`.
/// Failure redirect URL: `nhost-example://oauth.login.failure`

On GitHub I filled the following form:

image

there's only one URL to set (the Homepage URL)

And on NHost I am asked for URLs in the Settings -> Authentication page shown below:

image

The GitHub configuration doesn't show any URL other than the callback that I set on GitHub's settings

image

@diegonc
Copy link
Author

diegonc commented Nov 23, 2022

Also the nhost's OAuth URL now seems to be:

/// Fill in this value with the backend URL found on your Nhost project page.
const nhostGithubSignInUrl = '$nhostUrl/v1/auth/signin/provider/github';

instead of

/// Fill in this value with the backend URL found on your Nhost project page.
const nhostGithubSignInUrl = '$nhostUrl/v1/auth/providers/github/';

@tyrone-horizonlabs
Copy link

shouldn't this be raised to https://github.com/nhost/nhost/issues instead in this repository?

@elitan elitan transferred this issue from nhost/nhost-dart Nov 24, 2022
@elitan
Copy link
Contributor

elitan commented Nov 24, 2022

You can't set URLs for success/failure. Instead, Auth will always redirect the user to either the Client URL or an allowed redirect URL.

If there is an issue during the sign-in process, there will be parameters in the URL describing the error.

I can't see the OAuth URLs changing. They have always included signin/.

Some steps we can take to avoid confusion in the future:

  • Document how Client URL, Allowed URLs, and Redirect URL works.
  • Document what happens on success/failure during the OAuth sign-in process.

@elitan elitan self-assigned this Nov 24, 2022
@elitan elitan added the documentation Improvements or additions to documentation label Nov 24, 2022
@diegonc
Copy link
Author

diegonc commented Nov 24, 2022

I can't see the OAuth URLs changing. They have always included signin/.

I took the URL from the Oauth example in nhost-dart:

https://github.com/nhost/nhost-dart/blob/main/packages/nhost_flutter_auth/example/lib/oauth_providers_example.dart

as well as the instructions to setup urls.

that's why I raised this issue in nhost-dart initially

@elitan
Copy link
Contributor

elitan commented Nov 24, 2022

Oh, I see. Would you mind creating a separate issue for that specifically? And we can keep this issue here for documentation.

@diegonc
Copy link
Author

diegonc commented Nov 28, 2022

Oh, I see. Would you mind creating a separate issue for that specifically? And we can keep this issue here for documentation.

Done. nhost/nhost-dart#93

@stale
Copy link

stale bot commented May 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

3 participants