next-auth
Advanced tools
Comparing version 2.0.0-beta.41 to 2.0.0-beta.42
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _crypto=require("crypto"),_cookie=_interopRequireDefault(require("./lib/cookie")),_callbackUrlHandler=_interopRequireDefault(require("./lib/callback-url-handler")),_providers=_interopRequireDefault(require("./lib/providers")),_providers2=_interopRequireDefault(require("./routes/providers")),_signin=_interopRequireDefault(require("./routes/signin")),_signout=_interopRequireDefault(require("./routes/signout")),_callback=_interopRequireDefault(require("./routes/callback")),_session=_interopRequireDefault(require("./routes/session")),_pages=_interopRequireDefault(require("./pages"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){asyncGeneratorStep(h,d,e,f,g,"next",a)}function g(a){asyncGeneratorStep(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var DEFAULT_SITE="",DEFAULT_BASE_PATH="/api/auth",_default=function(){var a=_asyncToGenerator(function*(a,b,c){return new Promise(function(){var d=_asyncToGenerator(function*(d){var e,f=d,{url:g,query:h,body:i}=a,{slug:j,action:l=j[0],provider:m=j[1],error:k}=h,{csrfToken:n}=i,o=c.site||DEFAULT_SITE,p=c.basePath||DEFAULT_BASE_PATH,q="".concat(o).concat(p),r=c.secureCookies||q.startsWith("https://"),s=r?"__Secure-":"",t=_objectSpread({sessionToken:{name:"".concat(s,"next-auth.session-token"),options:{httpOnly:!0,sameSite:"lax",path:"/",secure:r}},callbackUrl:{name:"".concat(s,"next-auth.callback-url"),options:{sameSite:"lax",path:"/",secure:r}},baseUrl:{name:"".concat(s,"next-auth.base-url"),options:{httpOnly:!0,sameSite:"lax",path:"/",secure:r}},csrfToken:{name:"".concat(r?"__Host-":"","next-auth.csrf-token"),options:{httpOnly:!0,sameSite:"lax",path:"/",secure:r}}},c.cookies),u=c.secret||(0,_crypto.createHash)("sha256").update(JSON.stringify(c)).digest("hex"),v=!1;if(a.cookies[t.csrfToken.name]){var[y,z]=a.cookies[t.csrfToken.name].split("|");z===(0,_crypto.createHash)("sha256").update("".concat(y).concat(u)).digest("hex")&&(e=y,"POST"===a.method&&e===n&&(v=!0))}if(!e){e=(0,_crypto.randomBytes)(32).toString("hex");var A="".concat(e,"|").concat((0,_crypto.createHash)("sha256").update("".concat(e).concat(u)).digest("hex"));_cookie.default.set(b,t.csrfToken.name,A,t.csrfToken.options)}var w=!0;if(a.cookies[t.baseUrl.name]){var[B,C]=a.cookies[t.baseUrl.name].split("|");B===q&&C===(0,_crypto.createHash)("sha256").update("".concat(B).concat(u)).digest("hex")&&(w=!1)}if(w){var D="".concat(q,"|").concat((0,_crypto.createHash)("sha256").update("".concat(q).concat(u)).digest("hex"));_cookie.default.set(b,t.baseUrl.name,D,t.baseUrl.options)}var x=_objectSpread(_objectSpread({sessionMaxAge:2592000000,sessionUpdateAge:86400000,verificationMaxAge:86400000,debug:!1},c),{},{site:o,basePath:p,baseUrl:q,action:l,provider:m,cookies:t,secret:u,csrfToken:e,csrfTokenVerified:v,providers:(0,_providers.default)(c.providers,q),callbackUrl:o});if(x.callbackUrl=yield(0,_callbackUrlHandler.default)(a,b,x),"GET"===a.method)switch(l){case"providers":(0,_providers2.default)(a,b,x,f);break;case"session":(0,_session.default)(a,b,x,f);break;case"csrf":return b.json({csrfToken:e}),f();case"signin":m&&x.providers[m]?(0,_signin.default)(a,b,x,f):_pages.default.render(a,b,"signin",{site:o,providers:Object.values(x.providers),callbackUrl:x.callbackUrl,csrfToken:e},f);break;case"signout":_pages.default.render(a,b,"signout",{site:o,baseUrl:q,csrfToken:e,callbackUrl:x.callbackUrl},f);break;case"callback":if(m&&x.providers[m])(0,_callback.default)(a,b,x,f);else return b.status(400).end("Error: HTTP GET is not supported for ".concat(g)),f();break;case"check-email":_pages.default.render(a,b,"check-email",{site:o},f);break;case"error":_pages.default.render(a,b,"error",{site:o,error:k,baseUrl:q},f);break;default:return b.status(404).end(),f();}else if("POST"===a.method)switch(l){case"signin":if(m&&x.providers[m]){(0,_signin.default)(a,b,x,f);break}break;case"signout":(0,_signout.default)(a,b,x,f);break;default:return b.status(400).end("Error: HTTP POST is not supported for ".concat(g)),f();}else return b.status(400).end("Error: HTTP ".concat(a.method," is not supported for ").concat(g)),f()});return function(){return d.apply(this,arguments)}}())});return function(){return a.apply(this,arguments)}}();exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _crypto=require("crypto"),_cookie=_interopRequireDefault(require("./lib/cookie")),_callbackUrlHandler=_interopRequireDefault(require("./lib/callback-url-handler")),_providers=_interopRequireDefault(require("./lib/providers")),_providers2=_interopRequireDefault(require("./routes/providers")),_signin=_interopRequireDefault(require("./routes/signin")),_signout=_interopRequireDefault(require("./routes/signout")),_callback=_interopRequireDefault(require("./routes/callback")),_session=_interopRequireDefault(require("./routes/session")),_pages=_interopRequireDefault(require("./pages")),_adapters=_interopRequireDefault(require("../adapters"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){asyncGeneratorStep(h,d,e,f,g,"next",a)}function g(a){asyncGeneratorStep(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var DEFAULT_SITE="",DEFAULT_BASE_PATH="/api/auth",_default=function(){var a=_asyncToGenerator(function*(a,b,c){return new Promise(function(){var d=_asyncToGenerator(function*(d){var e,f=d,{url:g,query:h,body:i}=a,{slug:j,action:l=j[0],provider:m=j[1],error:k}=h,{csrfToken:n}=i,o=c.site||DEFAULT_SITE,p=c.basePath||DEFAULT_BASE_PATH,q="".concat(o).concat(p);if(c.adapter)e=c.adapter;else if(c.database)e=_adapters.default.Default(c.database);else return console.error("Error:\n","NextAuth requires a 'database' or 'adapter' option to be specified.\n","See documentation for details https://next-auth.js.org"),_pages.default.render(a,b,"error",{site:o,error:"Configuration",baseUrl:q},f),f();var r,s=c.secureCookies||q.startsWith("https://"),t=s?"__Secure-":"",u=_objectSpread({sessionToken:{name:"".concat(t,"next-auth.session-token"),options:{httpOnly:!0,sameSite:"lax",path:"/",secure:s}},callbackUrl:{name:"".concat(t,"next-auth.callback-url"),options:{sameSite:"lax",path:"/",secure:s}},baseUrl:{name:"".concat(t,"next-auth.base-url"),options:{httpOnly:!0,sameSite:"lax",path:"/",secure:s}},csrfToken:{name:"".concat(s?"__Host-":"","next-auth.csrf-token"),options:{httpOnly:!0,sameSite:"lax",path:"/",secure:s}}},c.cookies),v=c.secret||(0,_crypto.createHash)("sha256").update(JSON.stringify(c)).digest("hex"),w=!1;if(a.cookies[u.csrfToken.name]){var[z,A]=a.cookies[u.csrfToken.name].split("|");A===(0,_crypto.createHash)("sha256").update("".concat(z).concat(v)).digest("hex")&&(r=z,"POST"===a.method&&r===n&&(w=!0))}if(!r){r=(0,_crypto.randomBytes)(32).toString("hex");var B="".concat(r,"|").concat((0,_crypto.createHash)("sha256").update("".concat(r).concat(v)).digest("hex"));_cookie.default.set(b,u.csrfToken.name,B,u.csrfToken.options)}var x=!0;if(a.cookies[u.baseUrl.name]){var[C,D]=a.cookies[u.baseUrl.name].split("|");C===q&&D===(0,_crypto.createHash)("sha256").update("".concat(C).concat(v)).digest("hex")&&(x=!1)}if(x){var E="".concat(q,"|").concat((0,_crypto.createHash)("sha256").update("".concat(q).concat(v)).digest("hex"));_cookie.default.set(b,u.baseUrl.name,E,u.baseUrl.options)}var y=_objectSpread(_objectSpread({sessionMaxAge:2592000000,sessionUpdateAge:86400000,verificationMaxAge:86400000,debug:!1},c),{},{adapter:e,site:o,basePath:p,baseUrl:q,action:l,provider:m,cookies:u,secret:v,csrfToken:r,csrfTokenVerified:w,providers:(0,_providers.default)(c.providers,q),callbackUrl:o});if(y.callbackUrl=yield(0,_callbackUrlHandler.default)(a,b,y),"GET"===a.method)switch(l){case"providers":(0,_providers2.default)(a,b,y,f);break;case"session":(0,_session.default)(a,b,y,f);break;case"csrf":return b.json({csrfToken:r}),f();case"signin":m&&y.providers[m]?(0,_signin.default)(a,b,y,f):_pages.default.render(a,b,"signin",{site:o,providers:Object.values(y.providers),callbackUrl:y.callbackUrl,csrfToken:r},f);break;case"signout":_pages.default.render(a,b,"signout",{site:o,baseUrl:q,csrfToken:r,callbackUrl:y.callbackUrl},f);break;case"callback":if(m&&y.providers[m])(0,_callback.default)(a,b,y,f);else return b.status(400).end("Error: HTTP GET is not supported for ".concat(g)),f();break;case"check-email":_pages.default.render(a,b,"check-email",{site:o},f);break;case"error":_pages.default.render(a,b,"error",{site:o,error:k,baseUrl:q},f);break;default:return b.status(404).end(),f();}else if("POST"===a.method)switch(l){case"signin":if(m&&y.providers[m]){(0,_signin.default)(a,b,y,f);break}break;case"signout":(0,_signout.default)(a,b,y,f);break;default:return b.status(400).end("Error: HTTP POST is not supported for ".concat(g)),f();}else return b.status(400).end("Error: HTTP ".concat(a.method," is not supported for ").concat(g)),f()});return function(){return d.apply(this,arguments)}}())});return function(){return a.apply(this,arguments)}}();exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _index=require("./index"),_crypto=_interopRequireDefault(require("crypto"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var _default=(a,b)=>{var{type:c,callbackUrl:d}=a;if("oauth"===c){var i=(0,_index.oAuthClient)(a);if(a.version&&a.version.startsWith("2.")){var j=i.getAuthorizeUrl({redirect_uri:a.callbackUrl,scope:a.scope,state:_crypto.default.randomBytes(64).toString("hex")});if(a.authorizationUrl.includes("?")){var e=new URL(a.authorizationUrl),f="".concat(e.origin).concat(e.pathname,"?");j=j.replace(f,a.authorizationUrl+"&")}b(null,j)}else i.getOAuthRequestToken((c,d)=>{c&&console.error("GET_AUTHORISATION_URL_ERROR",c);var e="".concat(a.authorizationUrl,"?oauth_token=").concat(d);b(c,e)},d)}else if("oauth2"===c){var g=(0,_index.oAuth2Client)(a),h=g.code.getUri();b(null,h)}};exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAuthorizationUrl=void 0;var _index=require("./index"),getAuthorizationUrl=(a,b)=>{var{type:c,callbackUrl:d}=a;if("oauth"===c){var i=(0,_index.oAuthClient)(a);if(a.version&&a.version.startsWith("2.")){var j=i.getAuthorizeUrl({redirect_uri:a.callbackUrl,scope:a.scope,state:""});if(a.authorizationUrl.includes("?")){var e=new URL(a.authorizationUrl),f="".concat(e.origin).concat(e.pathname,"?");j=j.replace(f,a.authorizationUrl+"&")}b(null,j)}else i.getOAuthRequestToken((c,d)=>{c&&console.error("GET_AUTHORISATION_URL_ERROR",c);var e="".concat(a.authorizationUrl,"?oauth_token=").concat(d);b(c,e)},d)}else if("oauth2"===c){var g=(0,_index.oAuth2Client)(a),h=g.code.getUri();b(null,h)}};exports.getAuthorizationUrl=getAuthorizationUrl; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){asyncGeneratorStep(h,d,e,f,g,"next",a)}function g(a){asyncGeneratorStep(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var _default=function(){var a=_asyncToGenerator(function*(a,b,c,d){try{if(!c||!c.email)throw new Error("Missing or invalid profile");if(!d||!d.id||!d.type)throw new Error("Missing or invalid provider account");var e=yield a.getAdapter(),{createUser:f,updateUser:g,getUser:h,getUserByProviderAccountId:i,getUserByEmail:j,getUserByCredentials:k,removeUser:l,linkAccount:m,unlinkAccount:n,createSession:o,getSession:p,deleteSession:q}=e,r=b?yield p(b):null,s=!!r,t=s?yield h(r.userId):null,u=!1;if("email"===d.type){var v=yield j(c.email);if(!v)t=yield f(c),u=!0;else if(s){if(t.id===v.id)return{session:r,user:t,isNewAccount:u};yield q(b),t=v}else t=v;return r=yield o(t),{session:r,user:t,isNewAccount:u}}if("oauth"===d.type){var w=yield i(d.provider,d.id);if(!w){if(s)return yield m(t.id,d.provider,d.type,d.id,d.refreshToken,d.accessToken,d.accessTokenExpires),{session:r,user:t,isNewAccount:u};var x=yield j(c.email);if(x)throw new Error("Another user account associated with the same email address already exists");else return t=yield f(c),yield m(t.id,d.provider,d.type,d.id,d.refreshToken,d.accessToken,d.accessTokenExpires),r=yield o(t),u=!0,{session:r,user:t,isNewAccount:u}}else if(s){if(w.id===t.id)return{session:r,user:t,isNewAccount:u};throw new Error("This account is already associated with another user")}else return r=yield o(w),{session:r,user:w,isNewAccount:u}}else return Promise.reject(new Error("Provider not supported"))}catch(a){return Promise.reject(a)}});return function(){return a.apply(this,arguments)}}();exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){asyncGeneratorStep(h,d,e,f,g,"next",a)}function g(a){asyncGeneratorStep(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var _default=(a,b,c,d)=>new Promise(function(){var e=_asyncToGenerator(function*(e,f){try{if(!c||!c.email)return f(new Error("Missing or invalid profile"));if(!d||!d.id||!d.type)return f(new Error("Missing or invalid provider account"));var g=yield a.getAdapter(),{createUser:h,updateUser:i,getUserById:j,getUserByProviderAccountId:k,getUserByEmail:l,getUserByCredentials:m,removeUser:n,linkAccount:o,unlinkAccount:p,createSession:q,getSessionById:r,deleteSessionById:s}=g,t=b?yield r(b):null,u=!!t,v=u?yield j(t.userId):null,w=!1;if("email"===d.type){var y=yield l(c.email);if(!y)v=yield h(c),w=!0;else if(u){if(v.id==y.id)return e({session:t,user:v,isNewAccount:w});yield s(b),v=y}else v=y;return t=yield q(v),e({session:t,user:v,isNewAccount:w})}if("oauth"===d.type){var z=yield k(d.provider,d.id);if(z)return u?z.id===v.id?e({session:t,user:v,isNewAccount:w}):f(new Error("This account is already associated with another user")):(t=yield q(z),e({session:t,user:z,isNewAccount:w}));if(u)return yield o(v.id,d.provider,d.type,d.id,d.refreshToken,d.accessToken,d.accessTokenExpires),e({session:t,user:v,isNewAccount:w});var x=yield l(c.email);return x?f(new Error("Another user account associated with the same email address already exists")):(v=yield h(c),yield o(v.id,d.provider,d.type,d.id,d.refreshToken,d.accessToken,d.accessTokenExpires),t=yield q(v),w=!0,e({session:t,user:v,isNewAccount:w}))}f(new Error("Provider not supported"))}catch(a){f(a)}});return function(){return e.apply(this,arguments)}}());exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _preact=require("preact"),_preactRenderToString=_interopRequireDefault(require("preact-render-to-string"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var _default=(a)=>{var{site:b,error:c,baseUrl:d}=a,e="".concat(d,"/signin"),f=(0,_preact.h)("h1",null,"Error"),g=(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"site",href:b},b.replace(/^https?:\/\//,"")));switch(c){case"Signin":case"oAuthSignin":case"oAuthCallback":case"oAuthCreateAccount":case"EmailCreateAccount":case"Callback":f=(0,_preact.h)("h1",null,"Sign in failed"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"Something went wrong trying to sign in."),(0,_preact.h)("p",null,"Try signing in with a different account.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"oAuthAccountNotLinked":f=(0,_preact.h)("h1",null,"Sign in with another account"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"You might have signed in before with a different account."),(0,_preact.h)("p",null,"Sign in the same account you used originally to confirm your identity.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"EmailSignin":f=(0,_preact.h)("h1",null,"Sign in failed"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"Unable to send email to your address."),(0,_preact.h)("p",null,"You can try signing in again with a different account.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"Verification":f=(0,_preact.h)("h1",null,"Sign in failed"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"The link you followed may have been used already or it may have expired."),(0,_preact.h)("p",null,"Sign in links can only be used once and expire, you can a new sign in link at any time.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;default:}return(0,_preactRenderToString.default)((0,_preact.h)("div",{className:"error"},f,g))};exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _preact=require("preact"),_preactRenderToString=_interopRequireDefault(require("preact-render-to-string"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var _default=(a)=>{var{site:b,error:c,baseUrl:d}=a,e="".concat(d,"/signin"),f=(0,_preact.h)("h1",null,"Error"),g=(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"site",href:b},b.replace(/^https?:\/\//,"")));switch(c){case"Signin":case"oAuthSignin":case"oAuthCallback":case"oAuthCreateAccount":case"EmailCreateAccount":case"Callback":f=(0,_preact.h)("h1",null,"Sign in failed"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"Something went wrong trying to sign in."),(0,_preact.h)("p",null,"Try signing in with a different account.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"oAuthAccountNotLinked":f=(0,_preact.h)("h1",null,"Sign in with another account"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"You might have signed in before with a different account."),(0,_preact.h)("p",null,"Sign in the same account you used originally to confirm your identity.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"EmailSignin":f=(0,_preact.h)("h1",null,"Sign in failed"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"Unable to send email to your address."),(0,_preact.h)("p",null,"You can try signing in again with a different account.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"Verification":f=(0,_preact.h)("h1",null,"Sign in failed"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"The link you followed may have been used already or it may have expired."),(0,_preact.h)("p",null,"Sign in links can only be used once and expire, you can a new sign in link at any time.")),(0,_preact.h)("p",null,(0,_preact.h)("a",{className:"button",href:e},"Sign in")));break;case"Configuration":f=(0,_preact.h)("h1",null,"Server configuration error"),g=(0,_preact.h)("div",null,(0,_preact.h)("div",{className:"message"},(0,_preact.h)("p",null,"There is a problem with the NextAuth server configuration."),(0,_preact.h)("p",null,"Check the server logs for details.")));break;default:}return(0,_preactRenderToString.default)((0,_preact.h)("div",{className:"error"},f,g))};exports.default=_default; |
{ | ||
"name": "next-auth", | ||
"version": "2.0.0-beta.41", | ||
"version": "2.0.0-beta.42", | ||
"description": "An authentication library for Next.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/iaincollins/next-auth.git", |
@@ -40,3 +40,3 @@ # NextAuth | ||
To add `next-auth` to a project, create a file to handle authentication requests at `pages/api/auth/[...slug.js]`: | ||
To add `next-auth` to a project, create a file to handle authentication requests at `pages/api/auth/[...slug].js`: | ||
@@ -43,0 +43,0 @@ ```javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
67
33
84498