Skip to content

500 Error #1

Description

@databuzz

I'm trying this out for the first time and have setup a simple php file to get the $token and echo that back out. I'm getting a 500 error in the Apache error_log, but it feels like something is happening here as I'm getting the SMS from Claris with my 2 factor login token and also getting the 'New sign-in attempt' email each time I load the php file.

I'm using your example for testing this out:

`require_once DIR . '/vendor/autoload.php';

$credentials = new \MSDev\FMCloudAuthenticator\Credentials(
'your-fm-cloud-server',
'your-fmrest-user',
'your-fmrest-password',
\MSDev\FMCloudAuthenticator\Credentials::DAPI,
'your-database'
);

$authenticator = new \MSDev\FMCloudAuthenticator\Authenticate();
$token = $authenticator->fetchToken($credentials);`

updated with the credentials for my FileMaker Cloud server/user/database. Here's what I'm seeing in the Apache error_log:

Got error 'PHP message: PHP Notice: Trying to access array offset on value of type null in /opt/bitnami/apache/htdocs/filemaker_cloud_data_api/vendor/matatirosoln/fm-cloud-authentication/src/Authenticate.php on line 63PHP message: PHP Fatal error: Uncaught TypeError: Return value of MSDev\\FMCloudAuthenticator\\Authenticate::getCognitoToken() must be of the type string, null returned in /opt/bitnami/apache/htdocs/filemaker_cloud_data_api/vendor/matatirosoln/fm-cloud-authentication/src/Authenticate.php:63\nStack trace:\n#0 /opt/bitnami/apache/htdocs/filemaker_cloud_data_api/vendor/matatirosoln/fm-cloud-authentication/src/Authenticate.php(32): MSDev\\FMCloudAuthenticator\\Authenticate->getCognitoToken()\n#1 /opt/bitnami/apache/htdocs/filemaker_cloud_data_api/getToken.php(17): MSDev\\FMCloudAuthenticator\\Authenticate->fetchToken()\n#2 {main}\n\nNext MSDev\\FMCloudAuthenticator\\Exception\\AuthenticationException: Return value of MSDev\\FMCloudAuthenticator\\Authenticate::getCognitoToken() must be of the type string, null returned in /opt/bitnami/apache/htdocs/filemaker_cloud_data_api/vendor/matatirosoln/fm-cloud-authentication/src/Authenticate.php:34\nStack trace:\n#0 /opt/bitnami/apache/htdocs/filemaker_cloud_data_api/getToken.php(17): M...'

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