Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Conversation

saravanavelu-7845
Copy link

}

// If the 'code' query parameter is present in the uri, the code can exchanged for an access token
if (isset($_GET['code'])) {
    try {
        $accessToken = $oauth->getAccessToken($_GET['code']);
    } catch (OAuth2Exception $ex) {
        echo '<span class="label label-important">OAuth2 Error!</span>';
        echo '<div class="container alert-error"><pre class="failure-pre">';
        echo 'Error: ' . htmlspecialchars( $ex->getMessage() ) . "\n";
        echo "Error Details: \n";
        echo htmlspecialchars( print_r( $ex->getErrors() ) );
        echo '</pre></div>';
        die();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant