Skip to content

Any luck with SSR in Amplify? #1

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

Open
half2me opened this issue May 23, 2021 · 2 comments
Open

Any luck with SSR in Amplify? #1

half2me opened this issue May 23, 2021 · 2 comments

Comments

@half2me
Copy link

half2me commented May 23, 2021

Amplify seems to have SSR support now: https://aws.amazon.com/blogs/mobile/ssr-support-for-aws-amplify-javascript-libraries/
They show some examples for Next.js using:
Amplify.configure({ ...awsExports, ssr: true });
const { Auth, ... } = withSSRContext({ req });

Have you had any success with this in SvelteKit? This is the only hit on google for Amplify + SvelteKit atm :)

@adnansmajlovic
Copy link
Owner

Hi @half2me ,
Things progressed with SvelteKit in the last two months, so I just created a new repo with node adapter (https://github.com/adnansmajlovic/svk2), built it, run, and so far everything looks good to me. Usually, I'd store Amplify, Auth, API, etc in stores in the layout file, and then call them from stores in other components where they're needed.

Please let me know if you're having any issues.

@gnanakeethan
Copy link

@adnansmajlovic Can explain how you overcame this issue? I could not find a solid change.

aws-amplify/amplify-cli#5691

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

No branches or pull requests

3 participants