🔒 Add Nostr authentication login calls across association views

This commit is contained in:
user
2025-11-20 23:13:35 +01:00
parent 9c1cea5868
commit 851bab49eb
7 changed files with 7 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ mount(function () {
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
$logPubkeys = [

View File

@@ -43,6 +43,7 @@ on([
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
->where('pubkey', $pubkey)->first();

View File

@@ -48,6 +48,7 @@ on([
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
->where('pubkey', $pubkey)->first();

View File

@@ -44,6 +44,7 @@ mount(function () {
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
if (in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)) {

View File

@@ -41,6 +41,7 @@ mount(function () {
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
$this->isAllowed = true;

View File

@@ -35,6 +35,7 @@ mount(function () {
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
$this->isAllowed = true;

View File

@@ -65,6 +65,7 @@ mount(function () {
on([
'nostrLoggedIn' => function ($pubkey) {
\App\Support\NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
$this->isAllowed = true;