mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Allow configuration of SSO Cookie Domain (#16471)
This commit is contained in:
parent
7bdbd665af
commit
7f1bb7e73f
@ -95,13 +95,14 @@ const redirectWithAuth = (ctx) => {
|
||||
params: { provider },
|
||||
} = ctx;
|
||||
const redirectUrls = utils.getPrefixedRedirectUrls();
|
||||
const domain = strapi.config.get('server.admin.auth.domain');
|
||||
const { user } = ctx.state;
|
||||
|
||||
const jwt = getService('token').createJwtToken(user);
|
||||
|
||||
const isProduction = strapi.config.get('environment') === 'production';
|
||||
|
||||
const cookiesOptions = { httpOnly: false, secure: isProduction, overwrite: true };
|
||||
const cookiesOptions = { httpOnly: false, secure: isProduction, overwrite: true, domain };
|
||||
|
||||
const sanitizedUser = getService('user').sanitizeUser(user);
|
||||
strapi.eventHub.emit('admin.auth.success', { user: sanitizedUser, provider });
|
||||
|
Loading…
x
Reference in New Issue
Block a user