signinwith 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -34,7 +34,7 @@ export const verifySigninDiscord = async (config, verificationData) => {
34
34
  return profile.email ? { success: true, email: profile.email } : { success: false, error: 'Email not available from Discord' };
35
35
  };
36
36
 
37
- export default verifySignin = async (services, service, verificationData) => {
37
+ export default async function verifySignin (services, service, verificationData) {
38
38
  try {
39
39
  if (services.google && service === 'google') return await verifySigninGoogle(services.google, verificationData);
40
40
  if (services.meta && service === 'meta') return await verifySigninMeta(services.meta, verificationData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signinwith",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Simple and straightforward library for sign in / sign up with thirdparty oAuth services like Google, Meta, Apple, Discord...",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -247,4 +247,9 @@ For Discord and Apple, the `redirectUri` in the frontend configuration should po
247
247
  </html>
248
248
  ```
249
249
 
250
- This HTML file extracts the authorization code (or error) from the URL hash and sends it back to the main window using `postMessage`. The main application needs to listen for this message and then proceed with the backend verification. This approach is necessary because Discord's OAuth flow, when initiated in a popup, requires a way to pass the authorization code back to the originating window.
250
+ This HTML file extracts the authorization code (or error) from the URL hash and sends it back to the main window using `postMessage`. The main application needs to listen for this message and then proceed with the backend verification. This approach is necessary because Discord's OAuth flow, when initiated in a popup, requires a way to pass the authorization code back to the originating window.
251
+
252
+ Note: you can import this page as a string (to then return it as a response from your server) via:
253
+ ```javascript
254
+ import htmlContent from 'signinwith/redirect-oauth.html?raw';
255
+ ```
package/styles.css CHANGED
@@ -34,12 +34,12 @@
34
34
  }
35
35
 
36
36
  &.signinwith-button-facebook {
37
- background-color: #1877F2;
37
+ background-color: #0866ff;
38
38
  color: white;
39
- border-color: #1877F2;
39
+ border-color: #0866ff;
40
40
 
41
41
  &:hover {
42
- background-color: #1877F2;
42
+ background-color: #0866ff;
43
43
  }
44
44
  }
45
45