feat(astro): Add OAuth flow components - #3719
Merged
panteliselef merged 8 commits intoJul 16, 2024
Merged
Conversation
chore(astro): Make sure Clerk is loaded before invoking functions
🦋 Changeset detectedLatest commit: a35c4ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
wobsoriano
commented
Jul 15, 2024
Comment on lines
+10
to
+21
| // TODO: Move this to a prop when we implement more control components. | ||
| const functionName = 'handleRedirectCallback'; | ||
| --- | ||
|
|
||
| <div data-clerk-function-id={`clerk-${functionName}-${safeId}`}></div> | ||
|
|
||
| <script is:inline define:vars={{ props: Astro.props, functionName, safeId }}> | ||
| /** | ||
| * Store the id and the props for the Astro component in order to invoice the correct Clerk function once clerk is loaded. | ||
| * The above is handled by `invokeClerkAstroJSFunctions`. | ||
| * | ||
| * TODO: This should be moved to a separate file once we implement more control components. |
Member
Author
There was a problem hiding this comment.
Added some TODOs here so that in the future when we want to implement more control components that call invoke Clerk functions, we can extract and reuse it
wobsoriano
marked this pull request as ready for review
July 15, 2024 19:24
Co-authored-by: panteliselef <panteliselef@outlook.com>
panteliselef
approved these changes
Jul 16, 2024
panteliselef
left a comment
Contributor
There was a problem hiding this comment.
Nice work, can you make the demo repo public ?
panteliselef
enabled auto-merge (squash)
July 16, 2024 08:53
panteliselef
deleted the
rob/eco-42-add-support-for-authenticatewithredirectcallback
branch
July 16, 2024 12:02
Member
Author
Oh 🤦🏼 updated to public! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR tackles ECO-42 and introduces the
<AuthenticateWithRedirectCallback />component for both Astro and React. A new function was added to invoke Clerk methods when Clerk is loaded (similar to what we do with UI components).E2E tests are to follow based on our convo in #team-ecosystem. For now, here's a working demo and repo for some confidence.
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change