Unverified Commit cc5ba4d9 authored by Luke's avatar Luke Committed by GitHub
Browse files

display error message from apple jwt unpack (#836)

parent 73383f5f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -649,8 +649,10 @@ func (c *Client) CheckAppleToken(ctx context.Context, bundleId string, idToken s
	})

	// Check if verification attempt has failed.
	if token == nil || err != nil {
		return nil, errors.New("apple id token invalid")
	if err != nil {
		return nil, fmt.Errorf("apple id token invalid: %s", err.Error())
	} else if token == nil {
		return nil, fmt.Errorf("apple id token invalid")
	}

	// Extract the claims we need now that we know the token is valid.