If you wanna convince your boss here's github's email template ๐
https://githubuniverse.com/convince
https://githubuniverse.com/convince
GitHub Universe
GitHub's global developer event is back. Join the world's fair of software.
๐ฅ1
Forwarded from Beka (Beka)
Excited to announce the Auth.js project (formerly NextAuth.js) joins Better Auth
https://www.better-auth.com/blog/authjs-joins-better-auth
https://www.better-auth.com/blog/authjs-joins-better-auth
Better-Auth
Auth.js is now part of Better Auth
Auth.js, formerly known as NextAuth.js, is now being maintained and overseen by Better Auth team
Just sent my first-ever PR to the Laravel framework
added except() method to JsonResource class so you can easily exclude fields like:
Taylor Otwell reviewed it (yeah, that Taylor ๐) and said theyโll consider it for Laravel 13.
Didnโt get merged, but still feels awesome seeing my name in a Laravel PR thread ๐
Here's the link - https://github.com/laravel/framework/pull/57426
added except() method to JsonResource class so you can easily exclude fields like:
(new UserResource($user))->except(['email', 'profile.ssn']);
Taylor Otwell reviewed it (yeah, that Taylor ๐) and said theyโll consider it for Laravel 13.
Didnโt get merged, but still feels awesome seeing my name in a Laravel PR thread ๐
Here's the link - https://github.com/laravel/framework/pull/57426
GitHub
feat: Add exclude functionality to JsonResource by kalebalebachew ยท Pull Request #57426 ยท laravel/framework
Introduced a new protected property $excludes to hold attributes to be excluded from the resource array.
Added the except method to allow exclusion of specified attributes, supporting dot notation ...
Added the except method to allow exclusion of specified attributes, supporting dot notation ...
๐ฅ8
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