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

Auth Provider: Update Nhost to V2 #4770

Merged
merged 11 commits into from
Mar 16, 2022

Conversation

nunopato
Copy link
Contributor

@nunopato nunopato commented Mar 16, 2022

cc @dthyresson

@nunopato nunopato changed the title Np update nhost v2 Auth Provider: Update Nhost to V2 Mar 16, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@nunopato nunopato changed the title Auth Provider: Update Nhost to V2 [wip] Auth Provider: Update Nhost to V2 Mar 16, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@thedavidprice
Copy link
Contributor

Thanks @nunopato! We were having some trouble earlier with our CI yarn caching, so I gave it a reboot and think it's working now.

Do we need to include instructions for existing projects to upgrade to these changes, e.g. https://github.com/redwoodjs/redwood/pull/4770/files#diff-0d0be1da1708452d96c61864423d49a276ec2b1dd9ff4be7cdbc1d62e8f50a38

Not sure if there's much use at this time.

@dthyresson I'll let you determine if there are related doc updates.

@thedavidprice thedavidprice added the release:feature This PR introduces a new feature label Mar 16, 2022
Copy link
Contributor

@dthyresson dthyresson left a comment

Choose a reason for hiding this comment

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

Thanks @nunopato. LGTM and we can then update the playground which I see you have done.

I am not merging, thought, since the title of this PR still says "[wip]".

I will update branch to have CI run again.

But, otherwise approved!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@thedavidprice
Copy link
Contributor

@nunopato please do let me know if this is GTG and I'll get it merged.

Additionally, could you please:

  1. let me know if there are changes needed for apps upgrading to next version; if so, please write out the instructions
  2. confirm the docs are current; please update if not: https://redwoodjs.com/docs/authentication#nhost

Thanks!

nunopato and others added 3 commits March 16, 2022 14:23

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@nunopato nunopato changed the title [wip] Auth Provider: Update Nhost to V2 [Auth Provider: Update Nhost to V2 Mar 16, 2022
@nunopato nunopato changed the title [Auth Provider: Update Nhost to V2 Auth Provider: Update Nhost to V2 Mar 16, 2022
@nunopato
Copy link
Contributor Author

@thedavidprice PR is good to go.

  1. The change would be to use the new SDK. If you think this should be mentioned somewhere, please let me know where.
  2. The docs PR is here https://github.com/redwoodjs/redwoodjs.com/pull/1008

Thank you @thedavidprice @dthyresson

@thedavidprice
Copy link
Contributor

@nunopato Thank you!

re: "The change would be to use the new SDK." Could you just comment here as to how someone would do that? From the diff, it looks like it's a simple import swap, correct?

@nunopato
Copy link
Contributor Author

@thedavidprice

Yes, one would go from:

import { createClient } from 'nhost-js-sdk'

const nhostClient = createClient({
  baseUrl: 'url'
})

to

import { NhostClient } from '@nhost/nhost-js'

const nhostClient = new NhostClient({
  backendUrl: 'url'
})

Copy link
Contributor

Perfect. That’s all I need. Thank you!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@thedavidprice thedavidprice merged commit 5c59065 into redwoodjs:main Mar 16, 2022
@jtoar jtoar added this to the next-release milestone Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
No open projects
Status: Archived
Development

Successfully merging this pull request may close these issues.

None yet

5 participants