Configure nextcloud via curl -> CSRF check failed

841 Views Asked by At

I am trying to configure the nexctloud sociallogin plugin via curl. I looked into the request chrome sends when I configure the plugin, and tried to rebuild it with curl:

curl -X POST --user "$NEXTCLOUD_ADMIN_USER:$NEXTCLOUD_ADMIN_PASSWORD" \
  -F "options[disable_registration]=0" \
  -F "options[create_disabled_users]=0" \
  -F "options[allow_login_connect]=0" \
  (... more form options ...)
  https://$NEXTCLOUD_DOMAIN/apps/sociallogin/settings/save-admin

But I get:

{"message":"CSRF check failed"}

What do I have to send, so that CSRF check do not fail?

0

There are 0 best solutions below