Replies: 3 comments 2 replies
-
I have investigated more and have probably some part of the resolution but some of what I found confuses me more....
The redirect page in the application from @vhscom does not seem to grab anything from the redirect URL arguments. Is that argument a redirect that the previous redirect (to I guess right now, my next step is to have the redirect to be to "http://localhost" and not the SSL enabled one. |
Beta Was this translation helpful? Give feedback.
-
Hurrah! I added I also discovered that indeed the I think that I am close to a fully useful login sequence. If anybody has some comments or further guidance, I'd appreciate it. |
Beta Was this translation helpful? Give feedback.
-
I have a final redirect to my PS:
PPS: <script lang="ts" context="module">
export async function load({ fetch, session }) {
return {
props: {
session
}
};
}
</script>
<script>
export let session; /// The session prop is obtained from the `load` and contains the authentication data if any.
console.log('User data:', session.user);
<script>
// Rendering HTML below Here is a strange discovery: This is probably a detail in how sveltekit deals with the app/store variables. Once the above code was in use, the store variable containing the session suddenly had the value of the session both on the server and on the browser side. Might be worth exploring. |
Beta Was this translation helpful? Give feedback.
-
I have used Google and Facebook logins in some other application, using the APIs provided by these giants.
I find this SvelteKit Auth project interesting and am trying to integrate it in a new application.
I copied
login.svelte
,appAuth.ts
and the[...auth].ts
files from the app demo.When trying to open the login interface with Google, I get an error:
I note that in my previous apps, a separate window is created and then I get a code from Google, that I then send to a back4app server. The server handles the actual login verification.
The login uses
GoogleAuth
andresponseType="code"
as a parameter to obtain the code on the client side that will be sent to the server.In SvelteKit Auth, the same window where the web page was running is being used, so I presume the redirect URI comes into play here, but I am ignorant on how to make this all work. 😊
I would appreciate some guidance. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions