@extends('layouts.app') @section('content')
Auth Token Details

Token Information
@if($authToken->used_at) @endif
Token Hash: {{ $authToken->token }} Token is stored hashed for security
User: @if($authToken->user) {{ $authToken->user->name }} @if($authToken->user->email)
{{ $authToken->user->email }} @endif @else No User @endif
Action: @php $actionColors = [ 'approve' => 'success', 'reject' => 'danger', 'whatsapp_login' => 'info', 'kiosk_login' => 'primary' ]; @endphp {{ $authToken->action }}
Status: @php $isExpired = $authToken->expiry < now(); $isActive = !$authToken->used && !$isExpired; @endphp @if($authToken->used) Used @elseif($isExpired) Expired @else Active @endif
Expiry: {{ $authToken->expiry->format('d M Y, h:i A') }}
@if($isExpired) Expired {{ $authToken->expiry->diffForHumans() }} @else Expires in {{ $authToken->expiry->diffForHumans() }} @endif
IP Address: {{ $authToken->ip ?? 'N/A' }}
Used At: {{ $authToken->used_at->format('d M Y, h:i A') }}
Created At: {{ $authToken->created_at->format('d M Y, h:i A') }}
Last Updated: {{ $authToken->updated_at->format('d M Y, h:i A') }}
@canany(['update auth tokens', 'delete auth tokens'])
Actions
@can('update auth tokens') Edit Token @endcan @can('delete auth tokens')
@csrf @method('DELETE')
@endcan @if(!$authToken->used && !$isExpired) @endif
@endcanany
Usage Information
@if($isActive) Token is Active @elseif($authToken->used) Token Already Used @else Token Expired @endif

@if($isActive) This token can be used for authentication. @elseif($authToken->used) This token was used on {{ $authToken->used_at->format('d M Y, h:i A') }} @else This token expired on {{ $authToken->expiry->format('d M Y, h:i A') }} @endif

@switch($authToken->action) @case('approve')
Approve Action
This token can be used to approve submissions, checklists, or verifications.
@break @case('reject')
Reject Action
This token can be used to reject submissions, checklists, or verifications.
@break @case('whatsapp_login')
WhatsApp Login
This token can be used for WhatsApp-based authentication.
@break @case('kiosk_login')
Kiosk Login
This token can be used for kiosk device authentication.
@break @endswitch
Verify Token

Use this form to verify a raw token against this record:

@if($authToken->user)
User Information
Name: {{ $authToken->user->name }}
Email: {{ $authToken->user->email }}
Status: {{ $authToken->user->status }}
Role: @if($authToken->user->roles->count() > 0) @foreach($authToken->user->roles as $role) {{ $role->name }} @endforeach @else No Role @endif
@endif
@endsection @push('script') @endpush