Socket
Book a DemoInstallSign in
Socket

nativescript-instagram-auth

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-instagram-auth

Your awesome NativeScript plugin.

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

nativescript-instagram-auth

Easily integrate Instagram login for your NativeScript app (ready only for apps made with angular at the moment)

Installation

tns plugin add nativescript-instagram-auth

Configuration

Register the module and configure it with your credentials

Note: the redirect uri need to be the same you set on the instagram developers website > manage clients > security

import {InstagramAuthModule} from "nativescript-instagram-auth/angular";
// ...
// Register this module to your angular app
InstagramAuthModule.forRoot({
	clientId: 'YOUR_CLIENT_ID',
	redirectUri: 'A_VALID_REDIRECT_URL'
})

Launch the login screen (as a modal only)

private igLogin(): Promise<InstagramLoginResponse> {
	const options: ModalDialogOptions = {
		viewContainerRef: this.vcRef,
	        context: {},
	        fullscreen: true
        };
        return this.modalService.showModal(LoginComponent, options);
}

ngOnInit(): void {
	this.igLogin().then(({error, token}) => {
		if (error) {
                // the user cancelled the login process or an error raised
		} else {
			console.log(`access token: ${token}`);
		}
        });
    }

Example

Full example available in demo-angular folder

License

Apache License Version 2.0, January 2004

Keywords

NativeScript

FAQs

Package last updated on 11 Aug 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.