Skip to content

[BUG] Authorized event id_token type mismatch #130

@meops

Description

@meops

Firstly, thank you to all contributors!

I just got started with the package and am seeing an error at my callback endpoint following successful authorization:

Cannot assign string to property Webfox\\Xero\\Events\\XeroAuthorized::$id_token of type array at /MyApp/vendor/webfox/laravel-xero-oauth2/src/Events/XeroAuthorized.php:17

Line:
https://github.com/webfox/laravel-xero-oauth2/blob/27f85308e376f8ddfed26618220f064e39739434/src/Events/XeroAuthorized.php#L17

I see from tests that it is expecting like ['token' => foo'], but this doesn't seem to match with documented return of OauthCredentialManager::getData() which I understand is the source of the value.

When I change the XeroAuthorized id_token property type to string things seem to work.

Not sure if this really is a bug since it's fundamental functionality but can't see what I've done wrong, and sorry for not digging deeper if it's a simple mistake on my part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions