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

takes/src/main/java/org/takes/facets/auth/social/PsLinkedin.java token verify #1366

Open
Akvadevka opened this issue Dec 12, 2024 · 4 comments

Comments

@Akvadevka
Copy link

@yegor256 can you check, please
Here the token is used directly to retrieve user information without verifying its validity or expiration. If the token is expired or revoked, the code will simply throw an error without attempting to refresh the token or handle the situation in any way.

private Identity fetch(final String token) throws IOException {

@yegor256
Copy link
Owner

@Akvadevka you are right, but what can we do in this case? We simply fail with an exception and it's up to the user what to do: relogin again or just stop.

@Akvadevka
Copy link
Author

@yegor256 You can refresh the token. If refreshing is not possible, explicitly inform the user about the need to re-login instead of throwing an unhandled exception

@yegor256
Copy link
Owner

@Akvadevka we can't refresh inside the framework. It's only the web app can do, but catching the exception and then making a new request to LinkedIn server. Takes is a framework, not an app by itself. We can't be so pro-active in what we do.

@Akvadevka
Copy link
Author

Ok, i see

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

No branches or pull requests

2 participants