Skip to content

Commit cc8e67e

Browse files
authored
Fix access to undefined route (#1812)
1 parent ff03ff0 commit cc8e67e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/PassportServiceProvider.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ function (AuthorizationServer $server): void {
167167
);
168168
}
169169

170-
$server->enableGrantType(
171-
$this->makeDeviceCodeGrant(), Passport::tokensExpireIn()
172-
);
170+
if (Route::has('passport.device')) {
171+
$server->enableGrantType(
172+
$this->makeDeviceCodeGrant(), Passport::tokensExpireIn()
173+
);
174+
}
173175
})
174176
);
175177
}

0 commit comments

Comments
 (0)