Skip to content

Commit a57a825

Browse files
authored
使state具有唯一性 (#202)
1 parent 765941f commit a57a825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Providers/WeChat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function getCodeFields(): array
9292
'redirect_uri' => $this->redirectUrl,
9393
'response_type' => 'code',
9494
'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
95-
'state' => $this->state ?: md5(time()),
95+
'state' => $this->state ?: md5(uniqid()),
9696
'connect_redirect' => 1,
9797
], $this->parameters);
9898
}

0 commit comments

Comments
 (0)