0.0.2 • Published 8 months ago

@kickrtechnologies/authentication v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@kickrtechnology/auth-components

A collection of customizable authentication components for React applications.

Installation

npm install @kickrtechnologies/authentication
# or
yarn add @kickrtechnologies/authentication

Components

  1. CustomizableLogin
  2. CustomizableSignup
  3. CustomizableOTPVerification
  4. CustomizableForgotPassword

Usage

import { 
  CustomizableLogin, 
  CustomizableSignup,
  CustomizableOTPVerification,
  CustomizableForgotPassword 
} from '@kickrtechnologies/authentication';

// Login Component
function App() {
  return (
     <CustomizableSignup
      url={`/signin`}
      fields={['firstName', 'lastName', 'email', 'phone',"password"]}
      customStyles={{
        firstName: { borderColor: 'blue' },
        lastName: { borderColor: 'green' },
      }}
      containerStyle={{
        backgroundColor: '#c8e8fa',
        
        boxShadow: '0 0 10px rgba(0,0,0,0.2)',
        display:"flex",
        flexDirection:"column",
        justifyContent:"center",
        alignItems:"center",
        minWidth:"400px",
        maxWidth:"600px"
      }}
      inputStyle={{
        backgroundColor: '#ffffff',
        border: '1px solid #ddd',
        width:"340px"
      }}
      buttonStyle={{
        backgroundColor: '#ff5722',
        borderRadius: '20px',
       boxShadow:"5px 5px 1px green",
      }}
       
      brandingStyle={{
        color: 'blue',
        fontWeight: 'bold',
      }}
      secret_id="fewieioei"
      licenseKey="PAID_LICENSE_KEY"
    /> 

    <CustomizableLogin  
     url={`/dashboard`}
   containerStyle={{
        backgroundColor: '#c8e8fa',
       
        boxShadow: '0 0 10px rgba(0,0,0,0.2)',
        display:"flex",
        flexDirection:"column",
        justifyContent:"center",
        alignItems:"center",
        minWidth:"400px",
        maxWidth:"600px"
      }}
      inputStyle={{
        backgroundColor: '#ffffff',
        border: '1px solid #ddd',
        width:"340px"
      }}
      buttonStyle={{
        backgroundColor: '#ff5722',
        borderRadius: '20px',
       boxShadow:"5px 5px 1px green",
      }}
      brandingStyle={{
        color: 'blue',
        fontWeight: 'bold',
      }}
      onSubmit={handleSubmit}
      secret_id="fewieioei"
      licenseKey="PAID_LICENSE_KEY"  loginMethod = 'email' /> 
    

 <CustomizableProfile 
  fields={['firstName', 'lastName', 'city', 'location']}
  customStyles={{
    bio: { height: '100px' }
  }}
  containerStyle={{
    backgroundColor: '#c8e8fa',
    // backgroundColor: '#f0f0f0',
    boxShadow: '0 0 10px rgba(0,0,0,0.2)',
    display:"flex",
    flexDirection:"column",
    justifyContent:"center",
   
    alignItems:"center",
    minWidth:"400px",
    maxWidth:"600px"
  }}
  inputStyle={{
    backgroundColor: '#ffffff',
    border: '1px solid #ddd',
    width:"340px"
  }}
  buttonStyle={{
    backgroundColor: '#ff5722',
    borderRadius: '20px',
   boxShadow:"5px 5px 1px green",
  }}
  secret_id="fewieioei"
  token={count}
  
  
/> 

    <CustomizableOTPVerification
  numberOfDigits={4} // Default is 6
  customStyles={{
    input: { borderColor: 'blue' }
  }}
  containerStyle={{
    backgroundColor: '#c8e8fa',
    // backgroundColor: '#f0f0f0',
    boxShadow: '0 0 10px rgba(0,0,0,0.2)',
    display:"flex",
    flexDirection:"column",
    justifyContent:"center",
    alignItems:"center",
    minWidth:"400px",
    maxWidth:"600px"
  }}
  buttonStyle={{
    backgroundColor: '#ff5722',
    borderRadius: '20px',
   boxShadow:"5px 5px 1px green",
  }}
  
/> 

 <CustomizableForgotPassword
  resetMethod="email"
  onSendOTP={async (identifier) => {
    // API call to send OTP
    return true; // return success status
  }}
  onVerifyOTP={async (otp) => {
    // API call to verify OTP
    return true; // return success status
  }}
  onResetPassword={async (newPassword) => {
    // API call to reset password
    // Handle success/error
  }}
  inputStyle={{
    backgroundColor: '#ffffff',
    border: '1px solid #ddd',
    width:"340px"
  }}
  customStyles={{
    email: { borderColor: '#ddd' },
    password: { borderColor: '#ddd' },
    otpInput: { backgroundColor: '#f5f5f5' }
  }}
  containerStyle={{
    backgroundColor: '#c8e8fa',
    // backgroundColor: '#f0f0f0',
    boxShadow: '0 0 10px rgba(0,0,0,0.2)',
    display:"flex",
    flexDirection:"column",
    justifyContent:"center",
    alignItems:"center",
    minWidth:"400px",
    maxWidth:"600px"
  }}
  
  buttonStyle={{
    backgroundColor: '#ff5722',
    borderRadius: '20px',
     width:"340px",
   boxShadow:"5px 5px 1px green",
  }}
/> )}

Props

CustomizableLogin

PropTypeDescription
loginMethod'email' | 'phone'Login method
customStylesObjectCustom styles for components
licenseKeystringLicense key to remove branding

... Add documentation for other components ...

License

MIT © Kickrtechnology

acornacorn-jsxajvansi-escapesansi-regexansi-stylesanymatchargparseasynckitaxiosbabel-jestbabel-plugin-istanbulbabel-plugin-jest-hoistbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbabel-preset-current-node-syntaxbabel-preset-jestbalanced-matchbrace-expansionbracesbrowserslistbserbuffer-fromcallsitescamelcasecaniuse-litechalkchar-regexci-infocjs-module-lexercliuicocollect-v8-coveragecolor-convertcolor-namecombined-streamcommandercommondirconcat-mapconvert-source-mapcore-js-compatcreate-jestcross-spawncsstypedebugdedentdeep-isdeepmergedelayed-streamdetect-newlinediff-sequencesdoctrineelectron-to-chromiumemitteryemoji-regexerror-exescaladeescape-string-regexpeslint-scopeeslint-visitor-keysespreeesprimaesqueryesrecurseestraverseestree-walkeresutilsexecaexitexpectfast-deep-equalfast-json-stable-stringifyfast-levenshteinfastqfb-watchmanfile-entry-cachefill-rangefind-upflat-cacheflattedfollow-redirectsform-datafs.realpathfunction-bindgensyncget-caller-fileget-package-typeget-streamglobglob-parentglobalsgraceful-fsgraphemerhas-flaghasownhtml-escaperhuman-signalsignoreimport-freshimport-localimurmurhashinflightinheritsis-arrayishis-core-moduleis-extglobis-fullwidth-code-pointis-generator-fnis-globis-moduleis-numberis-path-insideis-referenceis-streamisexeistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsjest-changed-filesjest-circusjest-clijest-configjest-diffjest-docblockjest-eachjest-environment-nodejest-get-typejest-haste-mapjest-leak-detectorjest-matcher-utilsjest-message-utiljest-mockjest-pnp-resolverjest-regex-utiljest-resolvejest-resolve-dependenciesjest-runnerjest-runtimejest-snapshotjest-utiljest-validatejest-watcherjest-workerjs-tokensjs-yamljsescjson-bufferjson-parse-even-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjson5keyvkleurlevenlevnlines-and-columnslocate-pathlodash.debouncelodash.mergeloose-envifylru-cachemagic-stringmake-dirmakeerrormerge-streammicromatchmimemime-dbmime-typesmimic-fnminimatchmsnatural-comparenode-int64node-releasesnormalize-pathnpm-run-pathonceonetimeoptionatorp-limitp-locatep-tryparent-moduleparse-jsonpath-existspath-is-absolutepath-keypath-parsepicocolorspicomatchpiratespkg-dirprelude-lspretty-formatpromptsproxy-from-envpunycodepure-randqueue-microtaskrandombytesreactreact-domreact-isreact-routerreact-router-domregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregexpu-coreregjsgenregjsparserrequire-directoryresolveresolve-cwdresolve-fromresolve.exportsreusifyrimrafrun-parallelsafe-bufferschedulersemverserialize-javascriptshebang-commandshebang-regexsignal-exitsisteransislashsource-mapsource-map-supportsprintf-jsstack-utilsstring-lengthstring-widthstrip-ansistrip-bomstrip-final-newlinestrip-json-commentssupports-colorsupports-preserve-symlinks-flagtersertest-excludetext-tabletmplto-regex-rangetype-checktype-detecttype-festundici-typesunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptupdate-browserslist-dburi-jsv8-to-istanbulwalkerwhichword-wrapwrap-ansiwrappywrite-file-atomicy18nyallistyargsyargs-parseryocto-queue
0.0.2

8 months ago

0.0.1

8 months ago