Skip to content

Conversation

@levy52
Copy link

@levy52 levy52 commented Jun 12, 2025

Fix inline scripts to comply with CSP restrictions

Description

This pull request addresses the issue of inline JavaScript used in the Mageplaza Social Login module, which was blocked by Magento 2's Content Security Policy (CSP).

Fixed Issues (if relevant)

No related issue number provided, but the PR fixes general CSP compatibility problems when using Mageplaza Social Login in Magento 2 stores with CSP enabled.

Manual testing scenarios

Enable CSP in Magento 2 (e.g., Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self').

Install and enable the Mageplaza Social Login module with this fix.

Visit the login/register page and verify:

No CSP violations in browser dev tools.

Social login buttons work as expected (e.g., popup behavior, redirects).

Test with all supported providers (Google, Facebook, etc.).

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable) - not applicable here due to frontend nature of changes.

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

Successfully merging this pull request may close these issues.

1 participant