Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
push:
branches: [master, main]
pull_request:

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn

- run: corepack enable

- run: yarn install --immutable

- run: yarn lint

- run: yarn tsc

- run: yarn test

- run: yarn build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ jsconfig.json
test-report.xml
env.json
lib/
.expo/
config.ts

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
Expand Down
49 changes: 0 additions & 49 deletions .npmignore

This file was deleted.

14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ Simple <strong>LinkedIn</strong> login library for <strong>React-Native</strong>
$ yarn add @gcou/react-native-linkedin
```

If your project uses expo >= 48, then you need to add expo-crypto to your project.
The [uuid](https://www.npmjs.com/package/uuid) library uses the Expo module if present. If Expo >= 48, then the crypto elements are in the expo-crypto module
```bash
$ yarn add expo-crypto
```

## Security

Please note that you should give your linkedin client id but not your secret key to this component.
Expand All @@ -54,11 +48,11 @@ You should be aware that key can be found if you store it directly to your code.
## Example

```JavaScript
// See ./App.tsx file for details
// See ./example/App.tsx file for details
import React, { ReactElement, useRef } from 'react';
import { StyleSheet, View } from 'react-native';
import { StyleSheet, View, Button } from 'react-native';

import LinkedInModal, { LinkedInModalRef } from 'react-native-linkedin';
import LinkedInModal, { LinkedInModalRef } from '@gcou/react-native-linkedin';

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -146,6 +140,6 @@ export default function AppContainer() : ReactElement {

## Licence

[MIT](https://github.com/xcarpentier/react-native-linkedin/blob/master/LICENSE)
[MIT](https://github.com/GaelCO/react-native-linkedin/blob/master/LICENSE)

> made with ♥
24 changes: 0 additions & 24 deletions app.json

This file was deleted.

7 changes: 2 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
module.exports = {
presets: ['module:@react-native/babel-preset'],
};
2 changes: 2 additions & 0 deletions example/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
4 changes: 4 additions & 0 deletions example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
78 changes: 78 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
.kotlin/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Local LinkedIn app credentials
config.ts
5 changes: 5 additions & 0 deletions example/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
arrowParens: 'avoid',
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions example/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 3 additions & 3 deletions App.tsx → example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import {
Button,
ActivityIndicator,
StatusBar,
Alert,
} from 'react-native';

import { CLIENT_ID, CLIENT_SECRET, REDIRECT_URL } from './config';

import LinkedInModal, { LinkedInToken } from './src/';
import LinkedInModal, { LinkedInToken } from '@gcou/react-native-linkedin';

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -91,8 +92,7 @@ export default function AppContainer(): ReactElement {
setMessage(payload?.message);
setRefreshing(false);
} else {
// eslint-disable-next-line no-alert
alert(`authentication_code = ${authentication_code}`);
Alert.alert(`authentication_code = ${authentication_code}`);
}
};

Expand Down
17 changes: 17 additions & 0 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
gem 'nkf'
Loading
Loading