mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-16 08:46:48 +00:00
🔒 Add Nostr authentication login calls across association views
This commit is contained in:
@@ -49,6 +49,7 @@ mount(function () {
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||||
$logPubkeys = [
|
$logPubkeys = [
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ on([
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
||||||
->where('pubkey', $pubkey)->first();
|
->where('pubkey', $pubkey)->first();
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ on([
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
||||||
->where('pubkey', $pubkey)->first();
|
->where('pubkey', $pubkey)->first();
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ mount(function () {
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||||
if (in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)) {
|
if (in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ mount(function () {
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||||
$this->isAllowed = true;
|
$this->isAllowed = true;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ mount(function () {
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||||
$this->isAllowed = true;
|
$this->isAllowed = true;
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ mount(function () {
|
|||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
|
\App\Support\NostrAuth::login($pubkey);
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||||
$this->isAllowed = true;
|
$this->isAllowed = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user