Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commutatus/aiesec-embeddable-auth-test

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commutatus/aiesec-embeddable-auth-test

Embeddable authentication for AIESEC

  • 0.0.1-test-4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

AIESEC Embeddable Auth

Demo: https://embeddable-auth.netlify.com/ (Running staging environment)

Importing: If you are using it with any app having npm, run

$ npm install @commutatus/aiesec-embeddable-auth --save

In your app:

import '@commutatus/aiesec-embeddable-auth'

Use css from

node_modules/@commutatus/aiesec-embeddable-auth/bundle.css

For all other use cases:

Load the script from

https://unpkg.com/@commutatus/aiesec-embeddable-auth@latest/bundle.js

and the CSS from

https://unpkg.com/@commutatus/aiesec-embeddable-auth@latest/bundle.css

Usage

HTML:

<div id="embeddable-auth-container"></div>

Javascript:

const embeddableAuth = new EmbeddableAuth({
	target: document.getElementById('embeddable-auth-container'),
	props: {
		options: {
			registerButtonText: 'Get Started',
			loginButtonText: 'Login',
			defaultReferral: 'Other',
			afterLoginRedirectTo: '',
			title: 'Login/Register with AIESEC',
			showLogin: true,
			utm: {
				utm_source: 'your-utm-source-value',
				utm_medium: 'your-utm-medium-value',
				utm_campaign: 'your-utm-utm_campaign-value',
				utm_term: 'your-utm-utm_term-value',
				utm_content: 'your-utm-utm_content-value',
			},
			customMeta: {
				yourCustomField1: yourCustomValue1,
				yourCustomField2: yourCustomValue2
			},
			profileAttributes: {
				// See the next section for more info
			},

		},
		token: 'YOUR_TOKEN', // custom token for future features.
		api: 'production' // or 'staging'  MANDATORY
	}
});
OptionDefault ValueDescriptionType
registerButtonTextGet StartedText of the register buttonstring
loginButtonTextLoginText of the login CTA buttonstring
defaultReferralDefault value for referral (If used, the referral selection won't be shown to the user)string
afterLoginRedirectToUrl to redirect to after login or signup succeeded (without root domain) Example: 'opportunity/5999'string
titleLogin/Register with AIESECHeading of the container. This appears above the register/login title. Disabled if falsestring or false
showLogintrueWhether it should default to login screen. Signup screen will be shown by default if falseboolean
loginFormTitleLoginTitle for the login form. Disabled if falsestring or false
regsiterFormTitleRegisterTitle for the signup form. Disabled if falsestring or false
disableFormTogglefalseDo not allow user to switch between the register and the login form. Enabling this hides the button to switch between formsboolean
useModalLayouttrueControls whether the auth should be shown inside a modal or inside the target element itselfboolean

If you are using defaultReferral, please use one of these values given below:

Friend, Colleague, Information booth on campus, Classroom presentation, AIESEC Alumni, Facebook, WeChat, Twitter, Instagram, LinkedIn, , Other social media channel, Search Engine, Event, Telegram, Media (magazine, TV, newspaper or radio), Other

For profileAttributes, the data structure should be as follows. Note that this will not support any other field not mentioned in the structure given below.

{
	person_profile_attributes: {
		earliest_start_date: "dd-mm-yyyy",
		latest_end_date: "dd-mm-yyyy",
		duration_min: 6, // Number of weeks
		duration_max: 78, // Number of weeks
		languages: [
			10005,
			10006
		],
		nationalities: [1034],
		selected_programmes: [1],
		skills: [
			{
				id: 10147
			},
			{
				id: 10146
			}
		]
	}
}

The ID's which are passed in languages, nationalities and skills can be get from constants endpoints hyperlinked here Languages Nationalities Skills

For selected_programmes, the values are

NameValue
GV1
GT2
GE5

FAQs

Package last updated on 27 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc