mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 23:44:08 +00:00
Allow configuration of SSO Cookie Domain
This commit is contained in:
parent
6000668673
commit
156a6d9ece
@ -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