Ever wondered why we hash JWTs with a secret key if anyone can decode them anyway?
A JWT has three parts:
header.payload.signature
The header and payload are just Base64URL-encoded, not encrypted so yes, anyone can decode and read them. That’s intentional.
When a server receives a JWT, it recomputes the signature using its secret key and compares it to the token’s signature.
If someone changed even one letter in the payload like switching
to
the signatures wouldn’t match and the token would be rejected. so hashing a JWT with a key isn’t about secrecy it’s about authenticity.
It proves the data is real, untampered, and issued by someone who holds the secret.
A JWT has three parts:
header.payload.signature
The header and payload are just Base64URL-encoded, not encrypted so yes, anyone can decode and read them. That’s intentional.
When a server receives a JWT, it recomputes the signature using its secret key and compares it to the token’s signature.
If someone changed even one letter in the payload like switching
"role":"user"
to
"role":"admin"
the signatures wouldn’t match and the token would be rejected. so hashing a JWT with a key isn’t about secrecy it’s about authenticity.
It proves the data is real, untampered, and issued by someone who holds the secret.
🔥5
Distributed Locks in microservices
lets say multiple microservices share one cache, things can get messy fast two services might try to refresh the same token or update the same record.
A distributed lock makes sure only one process touches a shared resource at a time.
Laravel example
That’s it.
You can safely run multiple workers or services only one will hold the lock at a time.
lets say multiple microservices share one cache, things can get messy fast two services might try to refresh the same token or update the same record.
A distributed lock makes sure only one process touches a shared resource at a time.
Laravel example
$lock = Cache::lock('cache-key', 10); // 10 seconds
if ($lock->get()) {
try {
// ✅ Only one process gets here
$this->refreshToken();
} finally {
$lock->release();
}
} else {
// 🚫 Another process is refreshing already
}That’s it.
You can safely run multiple workers or services only one will hold the lock at a time.
👌2
Forwarded from Hossiy Dev
Today I dialed *804# to check my balance… ⏳
Then Ethio Telecom sent me a never-ending SMS 😩
Is that only me, or is anyone else frustrated by these giant messages too?
As a programmer 😊, instead of reading all this, I opened my PC and built this mini bot.
👉 Try it here: Tele Package Shortener
❤️ React for more updates!
👉 Join our channel for more powerful resources:
Then Ethio Telecom sent me a never-ending SMS 😩
Is that only me, or is anyone else frustrated by these giant messages too?
As a programmer 😊, instead of reading all this, I opened my PC and built this mini bot.
👉 Try it here: Tele Package Shortener
❤️ React for more updates!
👉 Join our channel for more powerful resources:
❤1🔥1
Back with another open-source contribution 😎
I wanted to use the Laravel Audit Logger package for a project, Turns out, it didn’t support PostgreSQL which I needed for the setup.
I decided to build and add a Postgres driver myself.
and guess what the PR got merged .
Not bad for my first open-source merged PR 😅
Here’s the PR thread → github.com/iamfarhad/laravel-audit-log/pull/4
I wanted to use the Laravel Audit Logger package for a project, Turns out, it didn’t support PostgreSQL which I needed for the setup.
I decided to build and add a Postgres driver myself.
and guess what the PR got merged .
Not bad for my first open-source merged PR 😅
Here’s the PR thread → github.com/iamfarhad/laravel-audit-log/pull/4
GitHub
feat: add PostgreSQL driver support by kalebalebachew · Pull Request #4 · iamfarhad/laravel-audit-log
-Adds native PostgreSQL support to Laravel Audit Logger via a new PostgreSQLDriver The driver mirrors the MySQL implementation while using PostgreSQL’s jsonb columns and indexing for better perform...
🔥7❤2
Forwarded from Shega Media
𝗘𝘁𝗵𝗶𝗼𝗽𝗶𝗮𝗻 𝗔𝗶𝗿𝗹𝗶𝗻𝗲𝘀 𝗘𝗻𝗮𝗯𝗹𝗲𝘀 𝗗𝗲𝗯𝗶𝘁 𝗖𝗮𝗿𝗱 𝗣𝗮𝘆𝗺𝗲𝗻𝘁𝘀 𝗧𝗵𝗿𝗼𝘂𝗴𝗵 𝗖𝗵𝗮𝗽𝗮’𝘀 𝗣𝗮𝘆𝗺𝗲𝗻𝘁 𝗚𝗮𝘁𝗲𝘄𝗮𝘆
For the first time, travelers can book flights and purchase airline services directly using Ethiopian debit cards, traditionally used for ATM withdrawals.
The move expands the airline’s digital payment ecosystem without having to establish individual integrations with each local bank.
The partnership also strengthens Chapa’s role in Ethiopia’s fintech landscape by expanding its payment services across major industries.
𝗙𝘂𝗹𝗹 𝘀𝘁𝗼𝗿𝘆.👇
https://shega.co/news/chapa-partners-with-ethiopian-airlines-to-enable-atm-card-payments-in-local-currency
For the first time, travelers can book flights and purchase airline services directly using Ethiopian debit cards, traditionally used for ATM withdrawals.
The move expands the airline’s digital payment ecosystem without having to establish individual integrations with each local bank.
The partnership also strengthens Chapa’s role in Ethiopia’s fintech landscape by expanding its payment services across major industries.
𝗙𝘂𝗹𝗹 𝘀𝘁𝗼𝗿𝘆.👇
https://shega.co/news/chapa-partners-with-ethiopian-airlines-to-enable-atm-card-payments-in-local-currency
👍1
Hey! We’re hiring a remote frontend intern (Ethiopia-based).
We’re building something big with Next.js you’ll make clean UIs and need to know how the web works. A bit of UI/UX skill helps.
No overqualified folks we want someone to grow with us.
• 3K/month
• Good shot at full-time
Send portfolio/resume to chord.addisvision@gmail.com. Let’s talk.
We’re building something big with Next.js you’ll make clean UIs and need to know how the web works. A bit of UI/UX skill helps.
No overqualified folks we want someone to grow with us.
• 3K/month
• Good shot at full-time
Send portfolio/resume to chord.addisvision@gmail.com. Let’s talk.
Forwarded from Samson Endale 🇪🇹
GitHub
Prompt users to use --dev flag for development-only packages by SamAsEnd · Pull Request #407 · laravel/pint
This PR introduces a mechanism to significantly improve the developer experience by guiding users to correctly place development-only dependencies into the require-dev block. When a package is inte...
CORS is not your backend protecting origins.
It’s the browser deciding whether to let JavaScript read a response
[Article Link]
It’s the browser deciding whether to let JavaScript read a response
[Article Link]
Medium
You Probably Misunderstood CORS Here’s the Full Explanation
Let’s be honest we’ve all been there. You hit your API from React or Vue, see that damn CORS error, and immediately think:
🔥2💯1
😁1
How many of you know about chapagram(@ChapagramBot) btw ?
- it lets you request money from your contacts
- split bills with your buddies.
- and there's a feature called shamo you should try out and many more.
- it lets you request money from your contacts
- split bills with your buddies.
- and there's a feature called shamo you should try out and many more.
🔥1🤔1
is it only me or does it bother you when someone says UX/UI instead of UI/UX 😭
🤔1
Forwarded from The Software Guy
Introducing the Hasab AI Flutter SDK! 🎉
I’m excited to announce that the Hasab AI Flutter SDK is now officially live on pub.dev!
This SDK makes it effortless for Flutter developers to integrate Hasab AI’s language understanding, speech transcription, and other AI-powered capabilities directly into their mobile apps, all with clean, developer-friendly APIs.
Whether you’re building AI chat features, transcription tools, or custom AI workflows, this SDK bridges Flutter apps with Hasab AI’s platform seamlessly.
👉 Check it out here: https://pub.dev/packages/hasab_ai_flutter
⭐️ Don’t forget to star it, share feedback
I’m excited to announce that the Hasab AI Flutter SDK is now officially live on pub.dev!
This SDK makes it effortless for Flutter developers to integrate Hasab AI’s language understanding, speech transcription, and other AI-powered capabilities directly into their mobile apps, all with clean, developer-friendly APIs.
Whether you’re building AI chat features, transcription tools, or custom AI workflows, this SDK bridges Flutter apps with Hasab AI’s platform seamlessly.
👉 Check it out here: https://pub.dev/packages/hasab_ai_flutter
⭐️ Don’t forget to star it, share feedback
Dart packages
hasab_ai_flutter | Flutter package
A comprehensive Flutter SDK for Hasab AI - speech-to-text, text-to-speech, translation, and chat capabilities for Ethiopian languages.
❤1