Skip to content

Producing temporary signed URLs from central app for a tenant. #249

@mdeloughry

Description

@mdeloughry

Love the package!

I'm just wondering if anyone has any advice on how to create temporarily signed URLs for a tenant, from inside the central app?

The problem I'm trying to solve is creating a user for a tenant from inside the central app and using https://github.com/spatie/laravel-welcome-notification to send a welcome email.

I'm able to create the user fine, I've also been able to send out the email but the temporary signed URL is always that of the central app, I've even tried overriding the sending/building of the email to be inside initaializeTenancy code block.

eg.

        tenancy()->initializeTenancy($this->tenant);

            $this->showWelcomeFormUrl = URL::temporarySignedRoute(
                'welcome', $this->validUntil, ['user' => $this->user->id]
            );

            return (new MailMessage)
                ->subject('Welcome to my app')
                ->action(Lang::get('Set initial password'), $this->showWelcomeFormUrl);

        tenancy()->endTenancy();

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions