Solved!
Probably the reason was that I was accessing the data passed in wrong way previously.
Here is how you should do it the right way:
for each key that is passed in data
create a parent window
query.
For example: I created one query for accessing user name and another for accessing access token. I named them userName
and accessToken
respectively. Now to access the data passed by parent window I have done userName.data
and accessToken.data
respectively.