File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
sites/svelte.dev/src/routes Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1111 );
1212
1313 window .addEventListener (' message' , function handler (event ) {
14+ if (event .data .source !== ' svelte-auth' ) return ;
1415 login_window .close ();
1516 window .removeEventListener (' message' , handler);
1617 invalidateAll ();
Original file line number Diff line number Diff line change @@ -33,13 +33,13 @@ export async function GET({ url }) {
3333 github_login : profile . login ,
3434 github_avatar_url : profile . avatar_url
3535 } ;
36-
3736 const { sessionid, expires } = await session . create ( user ) ;
3837
3938 return new Response (
4039 `
4140 <script>
4241 window.opener.postMessage({
42+ source: 'svelte-auth',
4343 user: ${ uneval ( user ) }
4444 }, window.location.origin);
4545 </script>
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const GET = client_id
1212 } ) . toString ( ) ;
1313
1414 redirect ( 302 , Location ) ;
15- }
15+ }
1616 : ( ) =>
1717 new Response (
1818 `
You can’t perform that action at this time.
0 commit comments