django, google app engine and google drive api - django

I'm trying to create a simple django project (website) that authenticates the user using OAuth2 and returns a list of files from my google drive account using the drive api v2.
the problem is that I can't get the authentication working, the exception is:
'WSGIRequest' object has no attribute 'redirect'
if someone has managed to get some application going using django mtv file structure get give me some references or a sample project please reply
The sample application can be accessed at: http://helloworldbyionut.appspot.com/home/

If you use app engine, easiest way to do oauth is to use oauth_required decorator. It does all the Oauth2 steps automatically.

Related

How to intergarte react native front end with django backend

Post Method Used In ReactNative
Error raised
Forbidden: /api/login/
I created a user API using djangorest framework and it is functioning well, however i dont know how to add it to my react native front end for authentication. I would like users to login and the drf to authenticate them. Is there a tutorial i can follow, i tried to look at a few but they didnt work for me. I'm new to react native. Would appreciate elaborate answers and shared resources
Currently using expo cli and unable to fetch data from drf(django rest framework).
is there a way i can request my post method to use djangosessions for authentication instead of auth tokens
the method in the image only works if
'rest_framework.authentication.SessionAuthentication',
is disabled and this is used to get data in api so it cannot be excluded
welcome to ReactNative
You can use different libraries to handle an api request.
Take a look at axios:
https://github.com/axios/axios

Authenticate users in my django app using an existing ASP.Net IdentityServer login app

I'm trying to authenticate users in my django app using an existing ASP.Net IdentityServer login app. I've seen the documentation has an example for an angular or react(Javascript based app) but not django. Does anyone have some sample code or tutorial that shows how to do in django? I'm new at this. Especially when it comes to the call back. I'm not sure i need to use an open iD client package to do this. Is it possible to do this in django? Or does it have to be a JS application? I appreciate any assistance
https://identityserver4.readthedocs.io/en/latest/quickstarts/4_javascript_client.html?highlight=authority#add-your-html-and-javascript-files

How to use External authentication in django app

I creating an app in which the authentication is done via web services of another app.
But as I m trying to understand how things will work, I m trying to figure out how I can store each user data and posts to them if I m not using Django auth and then linking the models via forgien keys.
All standard login's with other apps are done using a standard called OAuth2; Oauth2 standard allows you to login to apps with other services (Facebook, Apple, Google) while just storing a random token (not sensitive data).
Here is a Django library that makes using authenticating/logging into your app with another app's credentials super easy and secure using Oauth2.
Good luck, LMK if you need anything else!

Using autoML Rest API

I'm working on a JAVA application that uses Google autoML Rest API to classify images based on a trained model (I trained the model using the web platform directly).
I'm having trouble to send any request to use this API to make predictions or get the existing models, I'm always having a 404 error.
I doubt I don't have the needed permissions to make the call, I used OAuth2 to authenticate but still having the same problem. I'm pretty sure that the authentification is correct because I tried it on another API that requires it and it worked fine.
Furthermore, I've been working with the google video intelligence API and I didn't have this problem.
for example, if i would like to get the existing models, I send the following GET request:
Request URL : https://automl.googleapis.com/v1beta1/Project-ID/models
Error message : The requested URL
/v1beta1/Project-ID/models was not found on this server.
Any idea of the cause of this error?
According to the documentation for listing models, the endpoint that AutoML it's using is the following:
https://automl.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/us-central1/models
Where ${PROJECT_ID} should be your current Project ID

How to create the login app using webservice in livecode?

I am building a LiveCode application but I am newer in livecode. Can anyone suggest me how to create login app using the webservice api in livecode or any tutorial link that I can reference? Thank a lot.
There is no web services API built into LiveCode as such, but it is very simple to access existing RESTful APIs. You can submit GET requests using the form put URL "http://apihost.com/document.html?name=value". You can submit PUT requests using the LiveCode post command: post argList to URL "http://apihost.com/document.html".
If you are interested in a tutorial, see this one I put together at http://livecode.byu.edu/internet/webServicesIntro.php