Skip to content
Advertisement

Tag: token

Token expiration doesn’t working – Sanctum, Laravel

What I did: I added token expiration to application that has login system, by changed null to 1 minute expiration in sanctum.php file: Problem: It doesn’t work, the app still accept authorized requests all the time. Nothing has changed. Code: Create token (login): Verify token: Delete token (log out): Answer You might need to clear your config cache. Try to

Strange thing with PHP token confirmation

Before submitting the form, I check if the token matches like this: HTML: And for some reason, else is always triggered, although in theory the check should occur when sending data. What could be the problem? UPD.And besides, the error text is constantly visible at the top of the page, although I display all notifications using responseText(ajax request) and bootstrap

How to auto generate embed token using javascript and PHP?

I also posted this on the PowerBI Community but haven’t gotten any traction: https://community.powerbi.com/t5/Developer/Auto-Generate-Embed-Token-using-Javascript-and-PHP/td-p/1316556 I have gotten my report working in test with a token generated using the Microsoft Embed Token – Generate Token (here https://docs.microsoft.com/en-us/rest/api/power-bi/embedtoken/generatetoken) and by using the PowerShell commands. I got the formatting just right, changed some config and got it all working just how I wanted

Extract token from response url – Spotify API

I’m using this code to get a token from Spotify’s Web API: That results in this showing up in the browser: Great! But how do I extract “{token}” from the response and use it as a parameter in a request to the API? For example in the request to https://api.spotify.com/v1/users/{user_id}/playlists which needs the token in the header field. Thanks! Answer

Generating cryptographically secure tokens

In order to generate a 32 character token for access to our API we currently use: I have read that this method is not cryptographically secure as it’s based on the system clock, and that openssl_random_pseudo_bytes would be a better solution as it would be harder to predict. If this is the case, what would the equivalent code look like?

Advertisement