Err_too_many_redirects - "Invalid state" response from PHP getUser function

Thanks for posting an update with solution @brian.anderson!