Coder Social home page Coder Social logo

mobileuser-plugin's Introduction

Mobile Front-end user management for October CMS.

** Update: This plugin now works independent of the Mobile & RainLab User plugin. **

About Plugin

This plugin is similar to the RainLab.User plugin except it’s built to work with mobile front-ends. It exposes RESTful API nodes that enable interaction with the backend thereby allowing users to sign up and login.

Tutorial and demonstration of the plugin here.

Features

  • Completely extensible.
  • Select either login via Backend or Frontend (requires RainLab.User plugin) user models.

Coming Soon

  • Compatible with the multiple mobile apps feature of the mobile plugin.
  • Dashboard widget to provide user signup and register analytics.
  • Forgot password and signing out nodes (Currently, you can do it through website only).
  • Multiple Auth Schemes for better security.

Requirements

Client-side Integration

On the mobile app, you will have to make a call to the backend using the REST API that has been provided. Right now, the API works like this:

POST /account/signin

Resource URL: /api/v1/account/signin Run in Postman

Parameters Description
instance_id A unique ID, such as device ID or an ID generated using Google’s Instance ID API. Eg. 573b61d82b4e46e3
package The package name of the application. Must match the name specified in the variants. Eg. com.acme.myapp
email (or) username* The login attribute for the user attempting to sign in.
password* The password for the user attempting to sign in.

POST /account/register

Resource URL: /api/v1/account/register Run in Postman

Parameters Description
name The name of the user attempting registration.
email* The email for the user attempting registration.
username The username for the user attempting registration.
password* The password for the user attempting registration.

All * (asterisk) fields are mandatory.

mobileuser-plugin's People

Contributors

mohsin avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

dheia

mobileuser-plugin's Issues

Error when using login and register API

I got the mobile plugin to work -as in /api/v1/installs worked well and I see a record inserted.
I moved on to try the mobile user plugin, but doing a POST on register and login didn't work.

For login, I have:

https://www.domain.com/api/v1/account/signin?package=com.domain.app&[email protected]&password=test123&instance_id=123

I'm getting this message back:

"The instance id field is required."

For register, I have:

https://www.domain.com/api/v1/account/[email protected]&name=test ap&password=test123&username=testusernam

I'm getting this message back:

"The email field is required."

thanks,

[Issue created by kdoonboli: 2018-03-21]

[Comment created by timetraveller1992: 2018-03-21]
You are sending the request as a GET request with the parameters in the URL when I've mentioned in the documentation that it's a POST request. Kindly read the documentation and your issue would be resolved.

Mutliple variants causing problems

I went to create a new variant and received duplicate index error regarding my package name, but only one variant was listed in the app.

I went into phpmyadmin and cleared out the tables and it allowed me to create the variant. However, when I went to the Mobile controller to look at my installed instances, I received an out of bounds index error.

I looked into the code and found the problem and had to clear out the sessions table from the database.

I neglected to take some screenshots so my explanation may not be very helpful.

Update: Here's a screen shot
image

[Issue created by null: 2019-10-11]

[Comment created by null: 2018-04-26]
Sorry to keep bothering you. I am trying to get your plugins to work with a React Native project.. so far I am able to get my login working but I am having trouble with the Install API.

Using Postman, I am able to post to the end point and I think I have narrowed down my problem to around Line 86 where the method tries to save a new Install:

if($install->save()) {

I did some debugging by placing a return statement throughout the method (return $instance_id) and was able to get it to return properly all the way up to just before this line.

Now, I changed the save() method to create() and it will return $instance_id. If I removed the debug statement, show the install message in Postman.

However, going back to my app, if try to run call the Install endpoint there, I receive an Unrecognized token ‘<’ which tells me the JSON response is not correct.

What I’m trying to figure out is why Postman would be returning a JSON object but not my app.

Thanks again, I hope to hear back from you.

Larry

From: Saifur Rahman Mohsin [mailto:[email protected]]
Sent: Sunday, April 22, 2018 10:52 PM
To: timetraveller1992/MobileUser-Plugin
Cc: WWRF Resource; Author
Subject: Re: [timetraveller1992/MobileUser-Plugin] Mutliple variants causing problems (#3)

Hi. Thank you for reporting this. I’ll be verifying this and pushing an update to having this fixed. Will close the issue once patched and an update is pushed.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/timetraveller1992/MobileUser-Plugin/issues/3#issuecomment-383446892 , or mute the thread https://github.com/notifications/unsubscribe-auth/AbZ1fGwRzzGVB1jszfc32-AyOVEkjdfWks5trU_EgaJpZM4TfITH . https://github.com/notifications/beacon/AbZ1fJKNLDLBq-vYV3bIeT-s7m63MxHWks5trU_EgaJpZM4TfITH.gif


This message was sent using a free version of Proxy Manager http://www.dimastr.com/proxyman .
Do you want to send from your Exchange account using any of your proxy SMTP addresses?
Try Proxy Manager for free!

This footer will not appear in the registered version of Proxy Manager http://www.dimastr.com/proxyman .
Click http://www.dimastr.com/proxyman/register.htm here to register your copy.


This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

[Comment created by timetraveller1992: 2018-04-23]
Hi. Thank you for reporting this. I’ll be verifying this and pushing an update to having this fixed. Will close the issue once patched and an update is pushed.

Last seen not updating

This issue extends to the Mobile Plugin as well. Multiple installs and/or signins do not update the last seen field.

[Issue created by null: 2019-10-11]

Implementing relationConfig in Plugin.php

Hello,

I think you can improve the code in the Plugin.php that implements the relationConfig by safely merging instead of replacing it.

May I suggest using:

            // Safely splice in config for jobs relation
            $myConfigPath = '$/mohsin/user/models/relation.yaml';

            $controller->relationConfig = $controller->mergeConfig(
                $controller->relationConfig,
                $myConfigPath
            );

I tried to create a pull request but it wont let me. Thanks.

[Issue created by null: 2019-10-11]

[Comment created by timetraveller1992: 2019-10-11]
No problem! This issue has already been addressed anyway.

[Comment created by null: 2019-10-11]
@timetraveller1992 Hey Mohsin, it's been a while since I worked on this project. I'm going to close the issue. Thanks!

[Comment created by timetraveller1992: 2018-04-22]
Yep, I’ve planned to add this but later since it’s not too critical. The code is in a private repo and this one is mainly for the issue tracker and that’s why the PR failed. Thanks a lot for letting me know. I’ll update it in a couple of days.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.