-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS Teams Desktop tabs getAuthToken() flashes popup every time #1994
Comments
Hello @jurisjansons - Thanks for raising your query. |
@ChetanSharma-msft Classic Teams, in New Teams everything is working fine actually |
@jurisjansons - We will test this in Classic Teams and update you soon. |
@jurisjansons - We have tested this in Classic Teams with "@microsoft/teams-js": "^2.16.0". We didnt find any issue. Here is the video reference attaching. Could you please test this once and Confrim authTokenMethod.mp4 |
This is what I get. Tabs are React SPA project, seperate from Bot. In video, you can see background turning little yellow, that means teams.js is initialized. Might not be related to getAuthToken, will investigate further Microsoft.Teams.Classic.2023-10-23.14-03-02.mp4Code used to get token: |
@jurisjansons - Could you please confirm if your issue has resolved or still investigating |
@SaiPratap-MSFT issue still persists |
@jurisjansons - Did you get any error log or console log, please share with us show that we can investigate from our end. |
@SaiPratap-MSFT Only error I get is from |
@jurisjansons - We will check this and update you soon. |
Hello @jurisjansons - You need to call the login(...) function when you get the UiRequiredError. You can also leverage the @microsoft/teamsfx-react package when building react app, which handles the login for you. Please refer this thread as well: OfficeDev/teams-toolkit#10379 You can also refer this sample: https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/meetings-sidepanel/nodejs/server/Controllers/HomeController.js Sample repo: https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples |
@ChetanSharma-msft That is exactly what I am doing. The issue is that Only Teams Desktop (old version) is affected. Code that is causing this delay and throws error every time tab is opened:
|
Hello @jurisjansons - Thanks for sharing the information. |
@ChetanSharma-msft Hi! Are there any updates on this matter? |
@jurisjansons - Could you please refer this thread and let us know if that helps? |
@Prasad-MSFT Seems like original issue is resolved updating all libraries and using authentication as shown in example from your provided thread. Used sample code for authentication from this: https://github.com/KennethBWSong/authCodeTemplate/tree/master But unfortunately, I'm now facing different issue and can't seem to find any examples on how to use
Logs from console:
|
@Prasad-MSFT unfortunately the issue is back on MS Teams Web App and MS Teams Desktop App. Switching tabs, flashes login popup on every switch because of this error in console: Package versions:
auth-start.html:
auth-sso.html:
auth-end.html:
|
@jurisjansons - Is it occurring in New Teams?? |
There is an issue with
authentication.getAuthToken().then(...)
. When called, it opens popup every time when opening tab or switching tabs that causes an interuption for users. If I open Teams from web, no popup is shown and token is retreived from cache in matter of milliseconds. Using newest version"@microsoft/teams-js": "^2.16.0"
.The text was updated successfully, but these errors were encountered: