Skip to content
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

authentication.getAuthToken() on Teams web client return token after few seconds #2603

Open
vbatr opened this issue Nov 6, 2024 · 3 comments

Comments

@vbatr
Copy link

vbatr commented Nov 6, 2024

Hi,

I am calling microsoftTeams.authentication.getAuthToken() to get Tab SSO token. And everything works fine on Teams web and desktop clients. When the same code is executed in Teams mobile app it is taking few seconds (1 - 30 seconds) to get the token, that is slowing down the app performance a lot

const start = performance.now();
const token = await microsoftTeams.authentication.getAuthToken({ silent: true });
const end = performance.now();
console.log(`Execution time: ${end - start} ms`);

msteams-js library 2.17.0 - 2.30.0

Regards,
Volodymyr B.

@sayali-MSFT
Copy link

Thank you for your inquiry about your Teams app development issue! To assist you better, could you please provide the following details?
Please share the steps you took to encounter the issue.
This information will help us better understand the situation and provide a more accurate response.

Thank you!

@vbatr
Copy link
Author

vbatr commented Nov 8, 2024

Hi @sayali-MSFT

To reproduce an issue we can take the examples like https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/tab-personal-sso-quickstart/csharp_dotnetcore/wwwroot/js/auth.js#L41 or https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/tab-personal-sso-quickstart/js/src/components/Tab.js#L46
update msteams-js to one of the latest version (i.e. 2.30.0 ) and open tab in Teams mobile (iOS or Android).

getAuthToken() will return the token in few seconds that is affecting the performance of the app

Regards,
Volodymyr B.

@sayali-MSFT
Copy link

Hello @vbat,
Thank you for your patience! We were able to reproduce the issue in the Mobile (iOS) Teams version [6.19.77.2024193602/1022]. We have reported this as a bug for further investigation.

We will keep you updated as soon as we receive further information. Thank you for bringing this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants