edwinjansen's avatar

Laravel signed url ios/android sdk

Laravel comes with a package for signed url to secure urls

We would like to use this to secure our api for native apps. Iv searched but couldnt find any thing about generating signed urls within a native android/ios app.

Does anyone know how to manually create signed urls in a native app?

0 likes
1 reply
bobbybouwmann's avatar
Level 88

Well, you can't use the signed requests from Laravel in your app since they are signed with a unique formula within the framework. However, if you use the same hashing algorithm in your app you should be able to decode the hash.

'signature' => hash_hmac('sha256', $this->route($name, $parameters, $absolute), $key),

I Laravel the is the $key here the APP_KEY that is defined in your .env

Note that this is really complicated to get this right. I would rather suggest you to use a different kind of hash or are a base64 hash as an example.

Please or to participate in this conversation.