Problem/Motivation

If you request name/mail then the return method changes from GET to POST and then the error state is not correctly checked.

Steps to reproduce

Try to log in with Apple, then cancel. You get an error: "BadMethodCallException: Required parameter not passed: "code"

Proposed resolution

Use $request->get() instead of $request->query->get(). Note that there's no has() equivalent, so I changed the has() to get. While that is generally not recommended in favor of explicit checks, I think here it is fine.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 social_auth_apple-3202748-2.patch1.01 KBBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Status: Active » Needs review
FileSize
1.01 KB
ayalon’s picture

Thanks for the patch. I see the issue and fixed it.

  • jm.liip committed 21ac88e on 1.x
    Issue #3202748 by Berdir, ayalon: AppleAuthController::callback() does...

  • jm.liip committed c9dbb7e on 1.x authored by ayalon
    Issue #3202748 by Berdir, ayalon: AppleAuthController::callback() does...

ayalon credited jm.liip.

ayalon’s picture

Status: Needs review » Fixed
ayalon’s picture

Status: Fixed » Closed (fixed)