<?php

namespace App\Providers;

use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;

class MicropubSessionProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //allow micropub use in development
        if (config('app.env') !== 'production') {
            session(['me' => env('APP_URL')]);
            if (Storage::exists('dev-token')) {
                session(['token' => Storage::get('dev-token')]);
            }
        }
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}

<?php

namespace App\Providers;

use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;

class MicropubSessionProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //allow micropub use in development
        if (env('APP_DEBUG') == true) {
            session(['me' => env('APP_URL')]);
            if (Storage::exists('dev-token')) {
                session(['token' => Storage::get('dev-token')]);
            }
        }
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}

--- 
+++ 
@@ -15,7 +15,7 @@
     public function boot()
     {
         //allow micropub use in development
-        if (env('APP_DEBUG') == true) {
+        if (config('app.env') !== 'production') {
             session(['me' => env('APP_URL')]);
             if (Storage::exists('dev-token')) {
                 session(['token' => Storage::get('dev-token')]);
Set a micropub token when not in production
