01-22-2020 18:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-22-2020 18:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
I'm using the Authorization Code Grant Flow to gain access to user data, but after logging into my webpage and creating a new php session, when I click my button to go to the Fitbit authorization page and click the Allow button I get redirected back to my site where my session has ended and I'm logged out. If I navigate away from my page manually and then come back, the session stays active and I remain logged in -- I'm not sure what's causing my session to end during authentication, does anyone have any ideas?
Thank you!
01-23-2020 03:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-23-2020 03:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
After investigating further, I've discovered that my session that was started when I logged into my website doesn't end after all. Instead of continuing my session, though, a new session is created and used instead of the old session which still exits on the server. This makes me think that the issue might be with my php instead of the OAuth2 process. I'm going to go down that road and see where it leads.

01-23-2020 03:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-23-2020 03:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yep that was the problem -- I was creating a new session accidentally when I clicked my 'connect to fitbit' button. Fixed it by including my session manager script at the top of my fitbit authentication script.

01-23-2020 13:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-23-2020 13:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @jmather,
Welcome to the forums!
I'm glad to see you that you were able to figure it out on your own. Please let me know if you have any other questions and I'll be happy to assist.

